Request (!) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Request (!) (
/showthread.php?tid=357676)
Request (!) -
MrCripBloodz - 08.07.2012
Helllo guys can anyone tell me how to make this like if player die ( send client message to all )
%(playername) +(id) have Died (Reason : % )
please if anyone know how to THank you ;p
Re: Request (!) -
Kirollos - 08.07.2012
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(playerid != INVALID_PLAYER_ID)
{
new deathmsg[100], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(deathmsg, sizeof(deathmsg), "%s[%d] has died!", pname, playerid);
SendClientMessageToAll(0xFFFFFFFF, deathmsg);
}
return 1;
}
This should work.
Good Luck
Re: Request (!) - Emmet_ - 08.07.2012
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new
string[64],
pname[24];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "%s (ID: %d) has died (reason: %d).", pname, playerid, reason);
return SendClientMessageToAll(0xFFFF00FF, string); // yellow
}