[HELP] Vehicle Missions
#1

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.

Код:
new meatdelivery;
Код:
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.
Reply
#2

Replace
pawn Код:
if(IsPlayerInVehicle(playerid, meatdelivery))
with:
pawn Код:
if(GetPlayerVehicleID(playerid) == meatdelivery)
Reply
#3

I've changed it. Although I'm still getting the same errors.
Reply
#4

C'mon. I'm dying here.
Reply
#5

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)