Pickup problem - 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: Pickup problem (
/showthread.php?tid=144375)
Pickup problem -
ruckfules99 - 26.04.2010
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.
Re: Pickup problem -
dcmd_crash - 26.04.2010
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
Re: Pickup problem -
ruckfules99 - 26.04.2010
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.
oooo thanks for telling me about the pawn tags.
Anyone else know why this won't work?
Re: Pickup problem -
ruckfules99 - 27.04.2010
Bump, Anyone...
Re: Pickup problem -
Mauzen - 27.04.2010
If it gives you more ammo, maybe you forgot the amount you automatically get by picking up the pickup
Re: Pickup problem -
ruckfules99 - 27.04.2010
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.