HELP! CPS
#1

plz someone fix my script!
Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{

if(pickupid == pcmoneypickup)
{
  GivePlayerMoney(playerid, 20000);
  GameTextForPlayer(playerid,"Found 20000!",3000,5);
  return 1;
}
if(pickupid == pcheathpickup)
{
  SetPlayerHealth(playerid,100);
  GameTextForPlayer(playerid,"Found Some Health!",3000,5);
  return 1;
}
if(pickupid == pcarmorpickup)
{
  SetPlayerArmour(playerid,100);
  GameTextForPlayer(playerid,"Found Some Armour!",3000,5);
  return 1;
}

	return 1;
}
for some reason the top 2 ones dont work and the last 1 does all the things the top 2 are suposed to do!
for examlple:

pcmoneypickup gives 20K
pcheathpickup gived 100 heath
pcarmorpickup gives 100 armour


BUT ONLY pcarmorpickup works and it gives 200K full armour and full heath!
PLZ HELP

EDIT: ALSO the reason i put CPS as the title i need help with CPS, once i go into a checkpoint it disapears so i can never go in it again how can i fix that?
Reply
#2

Did you use "AddStaticPickup"??

In that case, use "CreatePickup" instead. Because AddStaticPickup does not return an ID.
Reply
#3

If pickupid = 1242 will give armor 100. and pickupid = 1240 will give health 100 automatic.
If you use "AddStaticPickup" in you script will not go to "OnPlayerPickUpPickup"

Ps. sry, My english very bad.


thank
chenza
Reply
#4

https://sampwiki.blast.hk/wiki/PickupGuide
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)