SA-MP Forums Archive
need help with onplayerpickuppickup - 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: need help with onplayerpickuppickup (/showthread.php?tid=65757)



need help with onplayerpickuppickup - Drift_04 - 15.02.2009

hey i need t know how to sepperate the different pickuppickups

i am doing it like this

if (pickupid == cash)
{
GivePlayerMoney(playerid,500);
}
if (pickupid == cash2)
{
GivePlayerMoney(playerid,500);
}

but when i pickup 1 of them it gives me both so how do i make it so it only does the 1? im thinking i need to sepperate them somehow. thankyou!



Re: need help with onplayerpickuppickup - AlExAlExAlEx - 15.02.2009

pawn Код:
if (pickupid == cash)
{
GivePlayerMoney(playerid,500);
}
else if (pickupid == cash2)
{
GivePlayerMoney(playerid,500);
}
*untested*


Re: need help with onplayerpickuppickup - Drift_04 - 16.02.2009

ok so do i do that with every other one now? like this.

if (pickupid == cash)
{
GivePlayerMoney(playerid,500);
}
else if (pickupid == cash2)
{
GivePlayerMoney(playerid,500);
}
else if (pickupid == cash3)
{
GivePlayerMoney(playerid,500);
}




Re: need help with onplayerpickuppickup - AlExAlExAlEx - 16.02.2009

yes but don't forget to return
pawn Код:
return 1;
}