SA-MP Forums Archive
CreatePickup - 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: CreatePickup (/showthread.php?tid=115587)



CreatePickup - TheNuttyScientist - 24.12.2009

I am having a problem creating a pick up.
Код:
new pickup;
CreatePickup(355, 1958.4805, 950.0847, 10.8203, -1);
I crash when I compile:

Код:
C:\Users\Joel\SA-MP Server Making Kit\gamemodes\lvdm.pwn(421) : warning 213: tag mismatch
C:\Users\Joel\SA-MP Server Making Kit\gamemodes\lvdm.pwn(420) : warning 203: symbol is never used: "pickup"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.



Re: CreatePickup - [HiC]TheKiller - 24.12.2009

pawn Код:
new pickup = CreatePickup(355, 1958.4805, 950.0847, 10.8203, -1);
What's wrong with that?


Re: CreatePickup - TheNuttyScientist - 24.12.2009

C:\Users\Joel\SA-MP Server Making Kit\gamemodes\lvdm.pwn(420) : warning 213: tag mismatch
C:\Users\Joel\SA-MP Server Making Kit\gamemodes\lvdm.pwn(420) : warning 204: symbol is assigned a value that is never used: "pickup"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Warnings.




Re: CreatePickup - [HiC]TheKiller - 24.12.2009

Is pickup already assigned to something? Post your whole code please.


Re: CreatePickup - TheNuttyScientist - 24.12.2009

Код:
new pickup = CreatePickup(355, 1958.4805, 950.0847, 10.8203, -1);
You mean this?



Re: CreatePickup - [HiC]TheKiller - 24.12.2009

Can I see your whole script or the area the error is?


Re: CreatePickup - TheNuttyScientist - 24.12.2009

The code what I just posted is the error line


Re: CreatePickup - Mystique - 24.12.2009

write this above OnGameModeInit:
Код:
new pickup;
Then write in OnGameModeInit:
Код:
pickup = CreatePickup(355, 1, 1958.4805, 950.0847, 10.8203, -1);
that should work.
The -1 means that the pickup shows in every virtual world.. change it to whatever you want if you dont want it to show in every world..


Re: CreatePickup - dice7 - 24.12.2009

pawn Код:
CreatePickup(model, type, Float:X, Float:Y, Float:Z, Virtualworld)
https://sampwiki.blast.hk/wiki/CreatePickup


Re: CreatePickup - Laura - 24.12.2009

Код:
#include <a_samp>



public OnGameModeInit()
{
  AddStaticPickup(model, type, Float:X, Float:Y, Float:Z, Virtualworld); 
  return 1;
}