Author Topic: How ? Please. 2 player, Just 1 have accept to skin [PAWN]  (Read 3606 times)

0 Members and 1 Guest are viewing this topic.

Offline sseebbyy

  • VC:MP Veteran
  • *****
  • Posts: 774
  • Immortal VC:MP Player
    • View Profile
    • Zombie Invasion => Server Forum [DEAD PROJECT]
How ? Please. 2 player, Just 1 have accept to skin [PAWN]
« on: June 24, 2011, 11:48:25 pm »
I do not know how to explain it too well ...

[PAWN]

I like when there are more players on the server, only one can make a skin, and others to have skin that hang

How?

For Example: there are 3 players on the server, and I have chosen me to be a cop, the other two can not select all the police.

Quote
Painful/Noob scripters acts like: I Am The Best Scripter Because I Announce My Releases With Big Font Size Without Giving Too Much Info' In The Hope They All Will Download And Check It. I Ignore Bad Replies, Replies That I Could Learn From, And Replies With So Much Text.



Offline [AoD]NC

  • VC:MP Beta Tester
  • VC:MP Veteran
  • *
  • Posts: 616
  • AoD forever!
    • View Profile
    • KURWA MAĆ
Re: How ? Please. 2 player, Just 1 have accept to skin [PAWN]
« Reply #1 on: June 25, 2011, 12:41:33 am »
I think it should be this way:

Code: [Select]
function onPlayerSpawn {
get current skin (possible? i think it is)
while (loop for all players) {
if selected players skin == spawned players skin {
kill.spawnedplayer()
}
}
}

Hope that helps :).

Offline sseebbyy

  • VC:MP Veteran
  • *****
  • Posts: 774
  • Immortal VC:MP Player
    • View Profile
    • Zombie Invasion => Server Forum [DEAD PROJECT]
Re: How ? Please. 2 player, Just 1 have accept to skin [PAWN]
« Reply #2 on: June 25, 2011, 10:46:34 am »
of course, thank you !  ;D ;D ;D

I think is possible !

Thank You Very Much !  ;D ;D

Quote
Painful/Noob scripters acts like: I Am The Best Scripter Because I Announce My Releases With Big Font Size Without Giving Too Much Info' In The Hope They All Will Download And Check It. I Ignore Bad Replies, Replies That I Could Learn From, And Replies With So Much Text.



Offline [AoD]NC

  • VC:MP Beta Tester
  • VC:MP Veteran
  • *
  • Posts: 616
  • AoD forever!
    • View Profile
    • KURWA MAĆ
Re: How ? Please. 2 player, Just 1 have accept to skin [PAWN]
« Reply #3 on: June 25, 2011, 01:12:23 pm »
I don't know if PAWN has onPlayerRequestSkin(), but then you could use the announce function to display "skin not available".

And one small note. In the while loop for all players, exclude the spawned player
Code: [Select]
while (loop for all players) {
if ( selected players skin == spawned players skin ) && ( spawned player ID != selected player ID) {
kill.spawnedplayer()
}
}

Offline sseebbyy

  • VC:MP Veteran
  • *****
  • Posts: 774
  • Immortal VC:MP Player
    • View Profile
    • Zombie Invasion => Server Forum [DEAD PROJECT]
Re: How ? Please. 2 player, Just 1 have accept to skin [PAWN]
« Reply #4 on: June 25, 2011, 10:12:18 pm »
I have any idea

look :

[pawn]new IsPRChosen;

public OnPlayerDeath(playerid, killerid, reason)
{
    if(PR[playerid] == 1) {
      SendClientMessage(playerid,COLOR_YELLOW,"test");
      if(IsPRChosen == 1) {
      IsPRChosen = 0;
      }
        }
    return 1;
}

public OnPlayerSpawn(playerid,classid,teamid)
{
    ToggleWidescreenForPlayer(playerid,0);
    if(PR[playerid] == 1) {
       if(IsPRChosen == 0) {
      PR[playerid] = 1;
      IsPRChosen = 1;
           }
       if(IsPRChosen == 1) {
           GameTextForPlayer(playerid,"~o~Is Busy This Skin !");
           SetPlayerHealth(playerid,0);
           }
           }
   return 1;
}

public OnPlayerRequestClass(playerid, classid, skinid)
{
if(classid == 0) {
       if(IsPRChosen == 0) {
       PR[playerid] = 1;
       SetPlayerSkin(playerid,0);
       GameTextForPlayerBottom(playerid,"~y~President");
         }
       if(IsPRChosen == 1) {
         GameTextForPlayerBottom(playerid,"~o~Busy");
         }
       }
   return 1;
}[/pawn]


But, at spawn , killed me imediatly...

Why?

I solved problem with one timer on onplayerspawn  ;D

TOPIC CLOSED


not work
« Last Edit: June 26, 2011, 07:12:46 am by StriKe »

Quote
Painful/Noob scripters acts like: I Am The Best Scripter Because I Announce My Releases With Big Font Size Without Giving Too Much Info' In The Hope They All Will Download And Check It. I Ignore Bad Replies, Replies That I Could Learn From, And Replies With So Much Text.



Offline sseebbyy

  • VC:MP Veteran
  • *****
  • Posts: 774
  • Immortal VC:MP Player
    • View Profile
    • Zombie Invasion => Server Forum [DEAD PROJECT]
Re: How ? Please. 2 player, Just 1 have accept to skin [PAWN]
« Reply #5 on: June 27, 2011, 01:49:55 pm »
I solved the problem... needed to add if(IsPRChosen == 1) { first, not if(IspPRChosen == 0) { first.

----Topic Closed------

Quote
Painful/Noob scripters acts like: I Am The Best Scripter Because I Announce My Releases With Big Font Size Without Giving Too Much Info' In The Hope They All Will Download And Check It. I Ignore Bad Replies, Replies That I Could Learn From, And Replies With So Much Text.