20.08.2009, 14:42
Hi, I am having a problem with this Pickup stuff.
I have the pickups clearly added, but my problem is this, When I pickup a pickup, it always Splashes "You get 50k Dollars" instead of something else. For example, if the player picks up the armour pickup, he Must get the Message : "You got some armour, go own some noobs" But instead he gets the Message "You got 50k dollars!" and receives the armour +50k dollars, which shouldn't happen.
This is the code
I have the pickups clearly added, but my problem is this, When I pickup a pickup, it always Splashes "You get 50k Dollars" instead of something else. For example, if the player picks up the armour pickup, he Must get the Message : "You got some armour, go own some noobs" But instead he gets the Message "You got 50k dollars!" and receives the armour +50k dollars, which shouldn't happen.
This is the code
Код:
public OnPlayerPickUpPickup(playerid, pickupid) { if (pickup == pickupSaveDisk) { GivePlayerMoney(playerid, 50000); GameTextForPlayer(playerid, "~g~You got 50k Dollars !", 3500, 0); return 1; } else if (pickup == pickupDollar) { GivePlayerMoney(playerid, 100000); GameTextForPlayer(playerid, "~g~You got 100k Dollars !", 3500, 0); return 1; } else if (pickup == pickupArmour) { SetPlayerArmour(playerid, 100.0); GameTextForPlayer(playerid, "~b~~h~~h~You got armour ! Go own some noobs !", 3500, 0); return 1; } else if (pickup == pickupHealth) { SetPlayerHealth(playerid, 100.0); GameTextForPlayer(playerid, "~r~~h~You have been healed !", 3500, 0); return 1; } return 1; }