Help with pickupid's
#1

When I try to put this code in "OnPlayerPickupPickup":
Quote:

public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == P1 || P2 || P3 || P4 || P5 || P6 || P7 || P8 || P9 || P10 || P11 || P12 || P13 || P14 || P15 || P16 || P17 || P18 || P19 || P20 || P21 || P22 || P23 || P24 || P25 || P26 || P27 || P28 || P29 || P30 || P31 || P32 || P33 || P34 || P35)
{
new string[128];
Moneybag[playerid] += 1;
GameTextForPlayer(playerid, "You have found a~n~~r~Money Bag~w~ worth ~g~100$!", 5000, 5);
format(string, sizeof(string), "[INFO:] You have found %d/35 Money Bags. Keep searching!", Moneybag[playerid]);
SendClientMessage(playerid, YELLOW, string);
GivePlayerCash(playerid, 100);
}
else if(pickupid == P35)
{
if(Moneybag[playerid] == 34)
{
Moneybag[playerid] += 1;
GameTextForPlayer(playerid, "Congratulations, you have found the last ~r~Money Bag!", 5000, 5);
SendClientMessage(playerid, COLOR_GREEN, "You've been given 20000$ as a reward");
GivePlayerCash(playerid,20000);
}
}
return 1;
}

... it affects every single pickup in my game including the houses and info icons. How do I make it so the command affects only my moneybags?
Reply


Messages In This Thread
Help with pickupid's - by Snyper - 27.05.2009, 22:08
Re: Help with pickupid's - by GammerZ - 27.05.2009, 23:25
Re: Help with pickupid's - by Snyper - 27.05.2009, 23:53
Re: Help with pickupid's - by Snyper - 28.05.2009, 18:51

Forum Jump:


Users browsing this thread: 1 Guest(s)