SA-MP Forums Archive
after death - 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: after death (/showthread.php?tid=156693)



after death - shoru93 - 23.06.2010

if i had deagle, when someone kills me how to drop the deagle down?


Re: after death - dice7 - 23.06.2010

Under OnPlayerDeath check if the player had a deagle, then create a deagle pickup on the players location or near it (-/+ 10 x and y) and use the weapon id as the model in CreatePickup

https://sampwiki.blast.hk/wiki/GetPlayerWeaponData
https://sampwiki.blast.hk/wiki/GetPlayerPos
https://sampwiki.blast.hk/wiki/CreatePickup
https://sampwiki.blast.hk/wiki/Weapons


Re: after death - DJDhan - 23.06.2010

Код:
public OnPlayerDeath(playerid,killerid,reason)
{
  if(killerid ! = INVALID_PLAYER_ID)
  {
    if(reason == 24)
    {
       new Float:x, Float:y, Float:z;
       GetPlayerPos(playerid,x,y,z);
       CreatePickup(348,4,x,y,z,0);
    }
  }
  return 1;
}
Err forgot about the weapon data, but you could do it


Re: after death - shoru93 - 23.06.2010

how exactely?


Re: after death - DJDhan - 23.06.2010

Quote:
Originally Posted by dice7
Under OnPlayerDeath check if the player had a deagle, then create a deagle pickup on the players location or near it (-/+ 10 x and y) and use the weapon id as the model in CreatePickup

https://sampwiki.blast.hk/wiki/GetPlayerWeaponData