if player
#1

Hi how can I add something like if a player is not russian he cannot enter that building.

similar to this.

public OnPlayerSpawn(playerid)
{
if(IsPlayerAdmin(playerid)) SendClientMessageToAll(0xDEEE20FF, "An admin spawned.");
else SendClientMessageToAll(0xDEEE20FF, "A user spawned.");
return 1;
}


Something like "You are not authorized to enter this building"
Reply
#2

Well, we need your variables and such. So, for example, if I have this enum:

pawn Code:
enum pInfo
{
    Race,
//Rest
}
new PlayerInfo[MAX_PLAYERS][pInfo];
And apparently, you set it so russian:
race = 2.

So if race is 2, it continues. So do it like this

pawn Code:
if(PlayerInfo[playerid][Race] == 2)
{
 //Enter Building
}
else if(Player..... // And so forth
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)