Quote:
Originally Posted by RedJohn
pawn Код:
public OnPlayerDeath(playerid, killerid, reason) { new PlayerName[MAX_PLAYER_NAME], KillerName[MAX_PLAYER_NAME], string[128]; GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); GetPlayerName(killerid, KillerName, sizeof(KillerName)); format(string, sizeof(string), "%s has been killed by %s!", PlayerName, KillerName); SendClientMessageToAll(0xFFFFFFFF, string); pInfo[playerid][pDeaths]++; pInfo[killerid][pKills]++; return 1; }
++ = Increases by 1.
EDIT: Why don't you use THIS instead of:
pawn Код:
new PlayerName[MAX_PLAYER_NAME], KillerName[MAX_PLAYER_NAME], string[128]; GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); GetPlayerName(killerid, KillerName, sizeof(KillerName)); format(string, sizeof(string), "%s has been killed by %s!", PlayerName, KillerName); SendClientMessageToAll(0xFFFFFFFF, string);
|
At first I didn't want to use this, but now I come to think of it... It'd be better since the chat won't get spammed out lol.
Thanks dude.