Code Dont Work
#1

This dont work i want it so that if the president is killed (not TEAM_TERR) i want it to say he was killed in a accident but it dont work

pawn Код:
if(gTeam[playerid] == TEAM_PRES)
{
if(TEAMPRES == playerid)
{
if(gTeam[killerid] != TEAM_TERR)
{
new string[156];
new pname[30];
GetPlayerName(playerid,pname,30);
format(string, sizeof(string),"%s(%d) Is No Longer President",pname,playerid);
SendClientMessageToAll(COLOR_TEAMYELLOW, string);
TEAMPRES = playerid;
GameTextForAll("~b~The President Has Been Killed In An Accident!", 8000, 5);
}
}
return 1;
}
Reply
#2

So you want it that if TEAM_TERR (terrorists) kill TEAM_PRES (president) then it says that it is an accident or if TEAM_PRES kills TEAM_PRES?
Reply
#3

I Want it so if ANYTHIN BUT team_terr kills pm it says the message
Reply
#4

Do you mean:
pawn Код:
if(killerid==INVALID_PLAYER_ID);
?
Reply
#5

..no
Reply
#6

what kind of accident??
Reply
#7

Then it should be like this:

pawn Код:
public OnPlayerDeath(playerid,killerid,reason)
{
    if(gTeam[playerid] == TEAM_PRES && gTeam[killerid] != TEAM_TERR)
    {
        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;
}
If the dead player is president and the killer is not a terrorist then the message will say he was killed by accident. Untested.
Reply
#8

Still dont work when i kill myself it dont say it and im NOT TEAM_TERR im TEAM_PRES so it should work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)