SA-MP Forums Archive
OnPlayerDeath Problem - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: OnPlayerDeath Problem (/showthread.php?tid=135644)



OnPlayerDeath Problem - Nick Deeds - 21.03.2010

I'm a bit new. Can someone help me with this?

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
  if(IsPlayerAdmin(playerid)) SendClientMessageToAll(0xDEEE20FF, "An admin spawned.");
  else SendClientMessageToAll(0xDEEE20FF, "A user spawned.");
  return 1;


  SendDeathMessage(killerid, playerid, reason);
  return 1;
}



Re: OnPlayerDeath Problem - Kyosaur - 21.03.2010

OnPlayerDeath is called when a player dies, not when someone spawns.

Try OnPlayerSpawn


Re: OnPlayerDeath Problem - Nick Deeds - 21.03.2010

Yea, I fixed it. Thanks!


Re: OnPlayerDeath Problem - Kyosaur - 21.03.2010

Quote:
Originally Posted by ScripterKidPerson
Yea, I fixed it. Thanks!
np .