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)
+--- Thread: Pickup problem (
/showthread.php?tid=346290)
Pickup problem -
Face9000 - 27.05.2012
Hello,i've created a drugpack but Pawno doesn't let me compile.
OnGameModeInit:
pawn Код:
new DrugPack = CreatePickup(1279, 14, -2179.2732,-260.0395,36.5156, 0);
OnPlayerPickUpPickup
pawn Код:
if(pickupid == DrugPack)
{
SendClientMessage(playerid, red, "You have now the drug pack,now you can start the drug smuggling job with /drug and collecting drug also!");
GameTextForPlayer(playerid, "~g~Drug pack taken!", 5000, 6);
PlayerInfo[playerid][pDrug] = 20;
HasTakenDrugPack[playerid] =1;
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
if(HasTakenDrugPack[playerid] == 1)
{
SendClientMessage(playerid,0xFF0000FF,"You have already a drug pack,you can't pickup it more.");
}
}
I keep getting this errors:
error 017: undefined symbol "DrugPack"
warning 204: symbol is assigned a value that is never used: "DrugPack"
Re: Pickup problem -
iggy1 - 27.05.2012
Make the DrugPack var global.
Re: Pickup problem -
IceCube! - 27.05.2012
Make it a gobal variable.
This forum requires that you wait 120 seconds between posts. Please try again in 62 seconds.
EDIT: Beaten to it -.- :P
Re: Pickup problem -
Face9000 - 28.05.2012
How to make it global variable?
Re: Pickup problem -
ReneG - 28.05.2012
pawn Код:
new DrugPack;
public OnGameModeInit()
{
DrugPack = CreatePickup(...);
return 1;
}
Re: Pickup problem -
Face9000 - 28.05.2012
Thank you.