OnPlayerDeath
#3

Quote:
Originally Posted by Mike Garber
Посмотреть сообщение
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(IsPlayerInAnyVehicle(playerid)
    {
        SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
    }
    new cadena[256];
    new name[MAX_PLAYER_NAME];
    new name2[MAX_PLAYER_NAME];
    new Float:px,Float:py,Float:pz;
    GetPlayerPos(playerid, px, py, pz);
    gPlayerSpawned[playerid] = 0;
    GetPlayerName(playerid, name, sizeof(name));
    GetPlayerName(killerid, name2, sizeof(name2));
    SendDeathMessage(killerid, playerid, reason);
    if(PlayerInfo[playerid][pGang] != PlayerInfo[killerid][pGang])
    {
        PlayerInfo[killerid][pKills] += 1;
        PlayerInfo[playerid][pDeaths] += 1;
        format(cadena,255,"%s killed %s",name2,name);
        SendClientMessageToAll(COLOR_NICERED, cadena);
    }
    return 1;
}
EDIT #2
Thanks! but i got only one error on line 304 "{" under "if" error 001: expected token: ")", but found "{"
Reply


Messages In This Thread
OnPlayerDeath - by cruising - 15.08.2010, 23:01
Re: OnPlayerDeath - by Mike Garber - 15.08.2010, 23:07
Re: OnPlayerDeath - by cruising - 15.08.2010, 23:18
Re: OnPlayerDeath - by Mike Garber - 15.08.2010, 23:31
Re: OnPlayerDeath - by cruising - 16.08.2010, 00:48

Forum Jump:


Users browsing this thread: 1 Guest(s)