08.11.2009, 17:21
Hi, I have a question.
On my server I have Team HQ's which require people not part of that team to have a key.
In the else if statement, I need the player entering the command to enter an id of a nearby player, and make the player receiving the key to get the key = to the team number.
Go gTeam = 1 gives Key = 1
- Key Variable.
On my server I have Team HQ's which require people not part of that team to have a key.
Код:
if(strcmp(cmd, "/givekey", true) == 0 || strcmp(cmd, "/gkey", true) == 0) { if(gTeam[playerid] == 0) { SendClientMessage(playerid, COLOR_RED, "You don't have any keys to give."); return 1; } else if(gTeam[playerid] == 1) { return 1; } return 1; }
Go gTeam = 1 gives Key = 1
Код:
new Key[MAX_PLAYERS];