SA-MP Forums Archive
I just can't work this out - 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: I just can't work this out (/showthread.php?tid=106784)



I just can't work this out - Packer5 - 05.11.2009

I've done this before and it worked, but I can't remember how to do it

Код:
public OnGameModeInit()
{
  new truckspawner = AddStaticPickup(2589, 23, 1335.4030,2674.2144,11.2392,0);
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
  if(pickupid == truckerspawner)
    {
      SendClientMessage(playerid, COLOR_GREEN, "You are at the truck spawner!");
    }
 return 0;
}
Quote:

C:\samp\server 7711\gamemodes\truckfr.pwn(469) : error 017: undefined symbol "truckspawner"
C:\samp\server 7711\gamemodes\truckfr.pwn(746) : warning 204: symbol is assigned a value that is never used: "truckspawner"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

can anyone help?

thanks


Re: I just can't work this out - M1K1 - 05.11.2009

CreatePickup


Re: I just can't work this out - Packer5 - 05.11.2009

Quote:
Originally Posted by M1K1
CreatePickup
BRILLIANT.
thanks


Re: I just can't work this out - Packer5 - 05.11.2009

Seem to be getting the same problem... it doesn't like me doing the "new" under a different header.
if I do it under OnPlayerPickUpPickup, it will now show because I havent picked it up yet xd


Re: I just can't work this out - dice7 - 05.11.2009

pawn Код:
new truckspawner;
public OnGameModeInit()
{
  truckspawner = CreatePickup();
}



Re: I just can't work this out - Packer5 - 05.11.2009

Quote:

C:\samp\server 7711\gamemodes\truckfr.pwn(469) : error 017: undefined symbol "truckspawner"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.




Re: I just can't work this out - dice7 - 05.11.2009

Show your code


Re: I just can't work this out - Packer5 - 05.11.2009

whole lot?


Re: I just can't work this out - Packer5 - 05.11.2009

k, stupid question

I sent it to you via PM :P


Re: I just can't work this out - dice7 - 05.11.2009

Put
pawn Код:
new truckspawner;
on the very top of the script