06.05.2014, 06:49
Onplayerdeath
OnPlayerRequestSpawn
I've created a command called /teams if I can record the error.
If I join terrorists, terrorists will be 1. If I join police, terrorists will be 1, and police will also be 1.
it doesn't subtract
pawn Код:
if(GetPlayerTeam(playerid) == 1) team1[playerid] = 1;
if(GetPlayerTeam(playerid) == 2) team2[playerid] = 1;
pawn Код:
if(class1[playerid] == 1)
{
if(tcount > acount)
{
SendClientMessage(playerid, -1, "Team is "COL_VIOLET"full"COL_WHITE"!");
return 0;
}
else
{
tcount++;
if(team2[playerid] == 1) acount--;
return 1;
}
}
if(class2[playerid] == 1)
{
if(acount > tcount)
{
SendClientMessage(playerid, -1, "Team is "COL_VIOLET"full"COL_WHITE"!");
return 0;
}
else
{
acount++;
if(team1[playerid] == 1) tcount--;
return 1;
}
}
If I join terrorists, terrorists will be 1. If I join police, terrorists will be 1, and police will also be 1.
it doesn't subtract