19.09.2012, 23:14
Under OnPlayerSpawn I have this:
I have this timer:
I have a command which shows the playersTeam variable along with GetPlayerTeam:
My friend and I are both on my server and when we type /myteam, it shows 1, 21 for both of us. When one of us shoots one another, we take damage when we aren't supposed to. I don't know why SetPlayerTeam isn't preventing the damage.
pawn Код:
SetPlayerTeam(playerid, playersTeam[playerid]);
pawn Код:
ptask PlayerUpdate[1000](playerid)
{
if(!InEvent[playerid])
{
SetPlayerTeam(playerid, playersTeam[playerid] + 20);
}
return 1;
}
pawn Код:
COMMAND:myteam(playerid, params[]) return SendServerMessageEx(playerid, "urteam: %d, %d", playersTeam[playerid], GetPlayerTeam(playerid));
My friend and I are both on my server and when we type /myteam, it shows 1, 21 for both of us. When one of us shoots one another, we take damage when we aren't supposed to. I don't know why SetPlayerTeam isn't preventing the damage.