after death
#1

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

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
Reply
#3

Код:
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
Reply
#4

how exactely?
Reply
#5

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)