SA-MP Forums Archive
Vehicle problem - 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)
+--- Thread: Vehicle problem (/showthread.php?tid=633157)



Vehicle problem - Despacito - 26.04.2017

I have a problem. I can't enter in ANY spawned vehicle even with a command.

Ex: i do /vehicle 574, the vehicle gets spawned but i can't enter. I press F and nothing happens, no animations, nothing. Even if i press G to enter as passenger.

I tried with an external cleo vehicle spawner but same thing, vehicle gets spawned but i cant enter.

The strange thing is: I CAN enter in the spawned vehicles loaded from a file, but if i spawn one, i can't.


Re: Vehicle problem - buburuzu19 - 26.04.2017

Quote:
Originally Posted by Despacito
Посмотреть сообщение
I have a problem. I can't enter in ANY spawned vehicle even with a command.

Ex: i do /vehicle 574, the vehicle gets spawned but i can't enter. I press F and nothing happens, no animations, nothing. Even if i press G to enter as passenger.

I tried with an external cleo vehicle spawner but same thing, vehicle gets spawned but i cant enter.

The strange thing is: I CAN enter in the spawned vehicles loaded from a file, but if i spawn one, i can't.
Show me your public OnVehicleSpawn.


Re: Vehicle problem - Despacito - 26.04.2017

I made a fuel system so there is:

Код:
public OnVehicleSpawn(vehicleid)
{
	Fuel[vehicleid] = 100.0;
	return 1;
}



Re: Vehicle problem - buburuzu19 - 26.04.2017

Quote:
Originally Posted by Despacito
Посмотреть сообщение
I made a fuel system so there is:

Код:
public OnVehicleSpawn(vehicleid)
{
	Fuel[vehicleid] = 100.0;
	return 1;
}
Alright, post here your /vehicle command.


Re: Vehicle problem - Despacito - 26.04.2017

I removed it. However it's not the command the problem.

The problem is that i can't enter in any fuckin vehicle even if i use an external spawner like cleo.


Re: Vehicle problem - buburuzu19 - 26.04.2017

Quote:
Originally Posted by Despacito
Посмотреть сообщение
I removed it. However it's not the command the problem.

The problem is that i can't enter in any fuckin vehicle even if i use an external spawner like cleo.
Cleo has nothing to do with your vehicle spawning system. Vehicles spawned by cleo are not synced with your server..


Re: Vehicle problem - DarkSkull - 26.04.2017

Do you have anything under on PlayerEnterVehicle? You might be returning 0 there. If not, Try using PutPlayerInVehicle(); function and see if you force yourself inside a vehicle.


Re: Vehicle problem - Despacito - 26.04.2017

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    return 1;
}
Where do i need to put PutPlayerInVehicle?