20.03.2013, 11:18
How can I get the killerid to OnDialogResponse ?
new killeridstored;
killeridstored = killerid
new
g_iKillerID[ MAX_PLAYERS ]
;
public OnPlayerDeath(playerid, killerid, reason)
{
g_iKillerID[ playerid ] = killerid;
//other stuff
return true;
}
Store it into an integer.
Below your includes add: pawn Код:
Now under OnPlayerDeath add: pawn Код:
Now you can use killeridstored. |
new LastKiller[MAX_PLAYERS];
LastKiller[playerid]=killerid;
if(gTeam[killerid] == gTeam[playerid])
case 0:// The first item listed
{
SendClientMessage(killerid, red, "....");
}
I made anti team kill OnPlayerDeath
pawn Код:
So how can I get killerid to OnDialogResponse example pawn Код:
|
SendClientMessage(LastKiller[playerid], red, "....");