19.09.2012, 23:28
To not use MyTeam:
The command:
Example:
pawn Код:
forward MyTeam(playerid);
public MyTeam(playerid)
{
if(gTeam[playerid] == TEAM_FBI)
{
SendClientMessage(playerid, COLOR_ORANGE,"You are in Team FBI!");
}
else if (gTeam[playerid] == TEAM_KILLER)
{
SendClientMessage(playerid, COLOR_ORANGE,"You are in Team KILLER!");
}
return 1;
}
pawn Код:
CMD:myteam(playerid, params[])
{
MyTeam(playerid);
return 1;
}
pawn Код:
public OnPlayerSpawn(playerid)
{
if(gTeam[playerid] == FBI)
{
new rand = random(sizeof(fbiSpawn));
SetPlayerPos(playerid,fbiSpawn[rand][0],fbiSpawn[rand][1],fbiSpawn[rand][2]);
SetPlayerFacingAngle(playerid,fbiSpawn[rand][3]);
SetPlayerColor(playerid,fbicolor);
SetPlayerTeam(playerid,FBI);
}
else if(gTeam[playerid] == KILLERS)
{
new rand = random(sizeof(KillersSpawn));
SetPlayerPos(playerid,KillersSpawn[rand][0],KillersSpawn[rand][1],KillersSpawn[rand][2]);
SetPlayerFacingAngle(playerid,KillersSpawn[rand][3]);
SetPlayerColor(playerid,Killerscolor);
SetPlayerTeam(playerid,KILLERS);
}
return 1;
}