Problem with GetPlayerWantedLevel and GetPlayerTeam or OnPlayerUpdate
#1

Код:
public OnPlayerUpdate(playerid)
	{
	GetPlayerPos(playerid, UpdateX, UpdateY, UpdateZ);
	if(GetPlayerWantedLevel(playerid)>0&&GetPlayerTeam(playerid)==TEAM_CIV)
		{
		print("is wanted and civ");
		for(new i = 0; i < GetMaxPlayers(); i++)
		{
			if(GetPlayerTeam(i)==TEAM_COP)
				{
				print("is cop somewhere");
				if(PlayerToPoint(2, i, UpdateX, UpdateY, UpdateZ))
					{
					print("someone busted");
					SpawnPlayer(playerid);
					ResetPlayerWeapons(playerid);
					SetPlayerHealth(playerid, 100);
					SetPlayerPos(playerid, -2631.6670, 1360.6400, 7.1086);
					}
				}
			}
		}
	return 1;
	}
Even
Код:
print("is wanted and civ");
is not called, but the TEAM_CIV is set on spawn and i set my TEAM_COP with a command but i don't know why it's not working.
Reply
#2

http://forum.sa-mp.com/index.php?topic=115828.0
Reply
#3

GetPlayerTeam and SetPlayerTeam are bugged. Create your own team variable, like gTeam[playerid] or something
Reply
#4

Quote:
Originally Posted by dice7
GetPlayerTeam and SetPlayerTeam are bugged. Create your own team variable, like gTeam[playerid] or something
Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)