When the player death create pickup
#1

Hello
When the player death create pickup of him weapon. I tried make it but it didn't work. Help me please.
Reply
#2

If he is holding a weapon use https://sampwiki.blast.hk/wiki/GetPlayerWeapon or use https://sampwiki.blast.hk/wiki/GetPlayerWeaponData and then create the pickup from there.
Reply
#3

please write example
Reply
#4

There is a script for this. Search might help you
Reply
#5

Код:
if(GetPlayerWeapon(playerid) == 31)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
CreatePickup(356,4,X,Y,Z,0);
}
if(GetPlayerWeapon(playerid) == 24)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
CreatePickup(348,4,X+2,Y+2,Z,0);
}
this don't work what's the problem ?
Reply
#6

Код:
for (new i=0; i<9; i++)
{
new sweapon,sammo;
GetPlayerWeaponData(playerid, i, sweapon, sammo);
if(sweapon == 31)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
CreatePickup(356,4,X,Y,Z,0);
}
if(sweapon == 24)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
CreatePickup(348,4,X+2,Y+2,Z,0);
}
}
this works in a command but in OnPlayerDeath don't. WHY?Help meee please
Reply
#7

Try searching on the forums, such scripts are released..
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)