[Help] if(IsPlayerInVehicle(playerid, X);
#1

Hi,

First of all, sorry about my english, It's not my lenguaje.
Okay, let's start. Today, I've been trying to make a gamemode which has Hunters and Hydras. If you want to drive them, you've got to have at least, 50 points (score) saved in the .txt dini.
Here's my question: how tha fuck can I build it? I've been trying for several hours and I couldn't do it.
I started denominating the first hydra with a
new then, I made a timer so, when the player gets into a car, the timer starts and checks if the car which the player entered is the Hydra. Do you people get me? here's the code:


Код:
forward CarCheck(playerid, vehicleid);
new hydraUSA1;
Код:
OnGameModeInIt();
hydra1 =	AddStaticVehicleEx(520,317.6323,2052.3049,18.3789,178.9925,86,86,10000);
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	SetTimer("CarCheck", 100, 1);
	return 1;
}
Код:
// ------------------------------> Timer CARCHECK <-----------------------------
public CarCheck(playerid, vehicleid);
{
	GetPlayerVehicleID(playerid);
	if(IsPlayerInVehicle(playerid, hydraUSA1))
	{
	  SendClientMessage(playerid, rojo_03,"-- Something happens... --");
	}
	else
	{
    SendClientMessage(playerid, rojo_03,"||-- Other thing happens... ---");
	}
}
And these are the errors:
Код:
D:\Facu\Cosas\Diseсo\GTA\SERVER\Lucoon\Lucoon\gamemodes\codESP.pwn(144) : warning 202: number of arguments does not match definition
D:\Facu\Cosas\Diseсo\GTA\SERVER\Lucoon\Lucoon\gamemodes\codESP.pwn(664) : error 055: start of function body without function header
D:\Facu\Cosas\Diseсo\GTA\SERVER\Lucoon\Lucoon\gamemodes\codESP.pwn(666) : error 010: invalid function or declaration
D:\Facu\Cosas\Diseсo\GTA\SERVER\Lucoon\Lucoon\gamemodes\codESP.pwn(670) : error 010: invalid function or declaration
D:\Facu\Cosas\Diseсo\GTA\SERVER\Lucoon\Lucoon\gamemodes\codESP.pwn(145) : warning 204: symbol is assigned a value that is never used: "hydraUSA1"
D:\Facu\Cosas\Diseсo\GTA\SERVER\Lucoon\Lucoon\gamemodes\codESP.pwn(145 -- 675) : warning 203: symbol is never used: "ret_memcpy"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
Anyway, I've been traying for hours and I couldn't reach the way for doing this. I heard about a filter script or include called "CAR ID" or something like that... It could define cars with id's, so then you would be able to use that id car in conditions/if, etc.

If you could help me defining vehicles and making conditions for them such as "IsPlayerInVehicle(playerid, ambulance) || ambulance = [the car...] or just the right way for doing this, I would appreciate it.
Thanks you.
Facu.
Reply


Messages In This Thread
[Help] if(IsPlayerInVehicle(playerid, X); - by Facuarg - 23.01.2010, 05:17
Re: [Help] if(IsPlayerInVehicle(playerid, X); - by mansonh - 23.01.2010, 08:40
Re: [Help] Dini file +(exactly ammount) - by Facuarg - 24.01.2010, 04:39
Re: [Help] if(IsPlayerInVehicle(playerid, X); - by mansonh - 24.01.2010, 09:13
Re: [Help] if(IsPlayerInVehicle(playerid, X); - by Facuarg - 24.01.2010, 17:13

Forum Jump:


Users browsing this thread: 1 Guest(s)