public OnPlayerRequestSpawn(playerid) { new playername[MAX_PLAYER_NAME]; if(gTeam[playerid]==Team_Cops) // POLICE { if(strcmp(playername,"LVC_Chrham2",false)==0) { SendClientMessage(playerid,COLOR_BLUE,"Welcome to you, Police Officer! You are now on duty and you must do your best to protect Chrham's City!"); return 1; } else { SendClientMessage(playerid,COLOR_BLUE,"Only cops who have applied at the forums can spawn."); SendClientMessage(playerid,COLOR_BLUE,"http://chrhamrpg.one-forum.net/businesses-f6/"); return 0; } } if(gTeam[playerid]==Team_FBI) // FBI { if(strcmp(playername,"LVC_Chrham2",false)==0) { SendClientMessage(playerid,COLOR_BLUE,"Welcome to you, FBI Officer! You are now on duty and you must do your best to protect Chrham's City!"); return 1; } else { SendClientMessage(playerid,COLOR_BLUE,"Only FBI Officers who have applied at the forums can spawn."); SendClientMessage(playerid,COLOR_BLUE,"http://chrhamrpg.one-forum.net/businesses-f6/"); return 0; } } if(gTeam[playerid]==Team_Army) // ARMY { if(strcmp(playername,"LVC_Chrham2",false)==0) { SendClientMessage(playerid,COLOR_BLUE,"Welcome to you guy in the army! You must do your best to protect Chrham's City!"); return 1; } else { SendClientMessage(playerid,COLOR_BLUE,"Only armys who have applied at the forums can spawn."); SendClientMessage(playerid,COLOR_BLUE,"http://chrhamrpg.one-forum.net/businesses-f6/"); return 0; } } else { return 1; } }
Originally Posted by Swift_
Get the player name, and then try, if I understnad what you're trying to do.
|
Originally Posted by Swift_
![]() You know only people with the name "LVC_Chrham2" can join those teams? |
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
Originally Posted by Swift_
Then as i said before, you have to get the players name aswell.
pawn Код:
|
Originally Posted by Chrham_2
Quote:
|
Originally Posted by Swift_
Quote:
|
new playername[MAX_PLAYER_NAME];