SA-MP Forums Archive
Simple help - 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: Simple help (/showthread.php?tid=613013)



Simple help - Fantje - 23.07.2016

I created a money drop.

PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
    new 
Float:x,Float:y,Float:z;
    
ResetPlayerMoney(playerid);
      
GetPlayerPos(playerid,x,y,z);
    
cash CreatePickup(1212,3,x,y,z);
    
cash2 CreatePickup(1212,3,x+1,y,z);
    
cash3 CreatePickup(1212,3,x-1,y,z);
    
cash4 CreatePickup(1212,3,x,y+1,z);
    
cash5 CreatePickup(1212,3,x,y-1,z);

The problem is:

I pick the money up but after I died again, the money will stay in that position. So it has to be destroyed after picking it up.

Who can help me?


Re: Simple help - K0P - 23.07.2016

Код:
public OnPlayerDeath(playerid, killerid, reason) 
{ 
    new Float:x,Float:y,Float:z; 
    ResetPlayerMoney(playerid); 
    GetPlayerPos(playerid,x,y,z); 
    return 1;
}



Re: Simple help - Stinged - 23.07.2016

Use type 8 instead of 3.


Re: Simple help - Fantje - 23.07.2016

nope type 8 is the sound id.


Re: Simple help - Stinged - 23.07.2016

What do you mean?
https://sampwiki.blast.hk/wiki/PickupTypes

Quote:

8 Disappears after pickup, but has no effect.

It is possible that the wiki is wrong though.


Re: Simple help - Fantje - 23.07.2016

Changing 3 to 8 doesn't work.