Weird :s
#1

This code works fine

Quote:

if(gTeam[playerid] == TEAM_PRES && TEAMPRES == playerid)
{
new string[128];
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
format(string, sizeof(string),"%s(%d) Is No Longer President",pname,playerid);
SendClientMessageToAll(COLOR_TEAMYELLOW, string);
GameTextForAll("~b~The President Has Been Killed In An Accident!", 8000, 5);
return 1;
}

But as soon as i add

&& gTeam[killerid] != TEAM_TERR

into the statement it dont work
Reply
#2

The first code works but when i add the second bit it dont it stops working and no errors
Reply
#3

Nooo i mean it works ingame but wen i add it stops working ingame pawno.exe is fine
Reply
#4

That's because if a person is killed by no one(falling/suicide) the killerid=255, and you gTeam[] thing can only go up to MAX_PLAYERS (199 + the number 0) so make sure you put that into account.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)