OnPlayerDeath - Updating Data
#3

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.
Reply


Messages In This Thread
OnPlayerDeath - Updating Data - by Slepur - 05.08.2013, 22:22
Re: OnPlayerDeath - Updating Data - by RedJohn - 05.08.2013, 22:30
Re: OnPlayerDeath - Updating Data - by Slepur - 05.08.2013, 22:36
Re: OnPlayerDeath - Updating Data - by RedJohn - 05.08.2013, 22:41
Re: OnPlayerDeath - Updating Data - by Slepur - 05.08.2013, 22:50
Re: OnPlayerDeath - Updating Data - by Amel_PAtomAXx - 05.08.2013, 23:16
Re: OnPlayerDeath - Updating Data - by RedJohn - 05.08.2013, 23:19
Re: OnPlayerDeath - Updating Data - by Slepur - 05.08.2013, 23:23
Re: OnPlayerDeath - Updating Data - by SuperViper - 05.08.2013, 23:25
Re: OnPlayerDeath - Updating Data - by Amel_PAtomAXx - 05.08.2013, 23:38

Forum Jump:


Users browsing this thread: 1 Guest(s)