Pickup problem
#1

I have a few pickups (weapons) in my Stadium and I need them to give a certain amount of ammo when they are picked up.

The problem i'm having is, I used the sa-mp wiki and still, it does not give the player the amount of ammo i specify.

Код:
new Sawnoff;
new Sawnoff;
new Armour;
new Health;
new Tec9;
new Cash; //in pleasure domes
Код:
//Pickups
Sawnoff = CreatePickup(350, 2, -1043.9336,1094.0066,1346.3627, -1); //sawnoff
Armour = CreatePickup(1240, 2, -1038.3934,1025.3640,1343.3010, -1); //health
Health = CreatePickup(1242, 2, -1067.4795,1088.3970,1346.5259, -1); //armour
Tec9 = CreatePickup(372, 2, -1018.7241,1062.9752,1343.0780, -1); //tec9
Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
 if(pickupid == Armour) 
  {
		SetPlayerArmour(playerid, 100.0);
  }
  else if(pickupid == Sawnoff)
  {
    GivePlayerWeapon(playerid,26,500);
  }
  else if(pickupid == Tec9)
  {
    GivePlayerWeapon(playerid,32,500);
  }
  else if(pickupid == Health)
  {
    SetPlayerHealth(playerid, 100);
  }
  else if(pickupid == Cash)
  {
    GivePlayerMoney(playerid, 1000);
  }
	return 1;
}

P.S Can someone teach me how to do the pawn tags lol.
Reply
#2

How can it not give the amount specified o_O? I don't see nay problem with that piece of code...


Do the pawn tags like [.pawn] CONTENT HERE [./pawn] just without the dots :P
Reply
#3

lol I don't see a problem either. It just gives me a low amount of ammo if i pick it up instead of giving me the amount i specified.


pawn Код:
new Sawnoff;


oooo thanks for telling me about the pawn tags.



Anyone else know why this won't work?
Reply
#4

Bump, Anyone...
Reply
#5

If it gives you more ammo, maybe you forgot the amount you automatically get by picking up the pickup
Reply
#6

Quote:
Originally Posted by Mauzen
If it gives you more ammo, maybe you forgot the amount you automatically get by picking up the pickup
My pickup should give me GivePlayerWeapon(playerid,26,500); so 500 ammo. But it's giving me like 65.


I'm not sure what you were saying though.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)