Help me please , fix error PLAYER_STATE_ALIVE
#3

Код:
GetPlayerTeam(playerid)
GetPlayerTeam is to get the player's team which he belongs.You would have used SetPlayerTeam to set player team.

Example Code:
Код:
new team[MAX_PLAYERS];
#define TEAM1 1
CMD:team(playerid)
{
team[playerid] = TEAM1; 
SetPlayerTeam(playerid, team[playerid]); // This function will set the player team.
return 1;
}

CMD:myteam(playerid)
{
if(GetPlayerTeam(playerid) == TEAM1) // To Get the Player team (TEAM1) using GetPlayerTeam.
{
   SendClientMessage(playerid, -1, "Your team is TEAM1");
}

return 1;
}
Reply


Messages In This Thread
Help me please , fix error PLAYER_STATE_ALIVE - by linhpro200294 - 27.08.2018, 10:49
Re: Help me please , fix error PLAYER_STATE_ALIVE - by Sew_Sumi - 27.08.2018, 12:42
Re: Help me please , fix error PLAYER_STATE_ALIVE - by UFF - 30.08.2018, 02:39
Re: Help me please , fix error PLAYER_STATE_ALIVE - by linhpro200294 - 01.09.2018, 18:10

Forum Jump:


Users browsing this thread: 1 Guest(s)