Getting a other player name
#2

Well, just declare a variable with a MAX_PLAYER_NAME cell, get the killerid name and store it in the variable:
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new Random = random(8001);
    killtimer1 = SetTimerEx("killtimer2",35000,0,"d",playerid);
    new pname[24];
    new string[130];
    new killername[ MAX_PLAYER_NAME ]; // New
    GivePlayerMoney(playerid,Random);
    GetPlayerName(playerid, pname, sizeof(pname));
    GetPlayerName( killerid, killername, MAX_PLAYER_NAME ); // New
    format(string, sizeof(string), "[KILL] "white"%s "green"Is killed by "white"%s. "red"Cash reward: %d", pname, killername, Random); // killerid to killername
    SendClientMessageToAll(COLOR_RED, string);
    return 1;
}
Reply


Messages In This Thread
Getting a other player name - by BloodGuy - 02.11.2011, 13:28
Re: Getting a other player name - by SmiT - 02.11.2011, 13:32
Re: Getting a other player name - by BloodGuy - 02.11.2011, 13:42

Forum Jump:


Users browsing this thread: 1 Guest(s)