[HELP] Vehicle Missions - 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: [HELP] Vehicle Missions (
/showthread.php?tid=80223)
[HELP] Vehicle Missions -
Abernethy - 03.06.2009
I was planning on making a small mission / freeroam script.
Does anybody know anything about it. Seems so hard to explain.
I want a Vehicle to spawn, & when you enter it a Checkpoint will appear & you drive to the destination to get your reward. I know how to add the Checkpoint & all that jazz. The problem is how do I define the Vehicle. Where & what do I put to get the Vehicles ID & to know what Vehicle they're in.
Код:
meatdelivery = CreateVehicle(482,-1876.3254,-209.2480,18.4886,268.2283,64,64, 1);
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(IsPlayerInVehicle(playerid, meatdelivery))
{
SetPlayerCheckpoint(playerid, 0.0, 0.0, 0.0, 10.0);
}
return 1;
}
ERROR
Код:
C:\Users\Madhouse\Desktop\Server\gamemodes\freeroam.pwn(36) : error 017: undefined symbol "meatdelivery"
C:\Users\Madhouse\Desktop\Server\gamemodes\freeroam.pwn(115) : error 017: undefined symbol "meatdelivery"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Re: [HELP] Vehicle Missions -
Andom - 03.06.2009
Replace
pawn Код:
if(IsPlayerInVehicle(playerid, meatdelivery))
with:
pawn Код:
if(GetPlayerVehicleID(playerid) == meatdelivery)
Re: [HELP] Vehicle Missions -
Abernethy - 03.06.2009
I've changed it. Although I'm still getting the same errors.
Re: [HELP] Vehicle Missions -
Abernethy - 03.06.2009
C'mon. I'm
dying here.
Re: [HELP] Vehicle Missions -
Donny_k - 03.06.2009
Make sure 'meatdelivery' is global and not created in OnGameModeInit (or Filter). Also why are you checking if they are in a vehicle in the entering vehicle callback, this is the event which fires when they are entering a vehicle dude so they won't be in it yet will they.