how to make not usefull vehicle? -
ancezas - 12.11.2013
hi i need to make an not sitible ant not movetlib vehicle, so no one can enter it or push it in to onother place, the question is how?
Re: how to make not usefull vehicle? -
dominik523 - 12.11.2013
you can do it with this:
Код:
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, 0,0,0,1,0,0,0);
You can add custom stock to lock some vehicles under OnGameModeInit
Re: how to make not usefull vehicle? -
Pottus - 12.11.2013
Quote:
Originally Posted by dominik523
you can do it with this:
Код:
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, 0,0,0,1,0,0,0);
You can add custom stock to lock some vehicles under OnGameModeInit
|
That is insufficient in fact almost any method is since a cheater could just go inside anyways.
Re: how to make not usefull vehicle? -
dominik523 - 12.11.2013
he can then make a timer to check if somebody is in any locked vehicle. I got something like that scripted for my faction vehicles
Re: how to make not usefull vehicle? -
AIped - 12.11.2013
I did manage to make such thing, but then the player couldnt get OUT of his car anymore.
Each time the player pressed the vehicle enter/exit button the script checked if he was allowed to exit.
Im sure it can be done in reverse somehow
Re: how to make not usefull vehicle? -
ancezas - 12.11.2013
pawn Код:
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(tacka1 || tacka2 || tacka3 || tacka, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(tacka1 || tacka2 || tacka3 || tacka, 0,0,0,1,0,0,0);
not working, i need to know how to make it not move
Re: how to make not usefull vehicle? -
Sinner - 12.11.2013
Quote:
Originally Posted by ancezas
pawn Код:
new engine, lights, alarm, doors, bonnet, boot, objective; GetVehicleParamsEx(tacka1 || tacka2 || tacka3 || tacka, engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(tacka1 || tacka2 || tacka3 || tacka, 0,0,0,1,0,0,0);
not working, i need to know how to make it not move
|
You can't "lock it in place", if that's what you mean. Try checking every X time if the vehicle is still in the position it's supposed to be and reset it to the correct position if it's not.
As for the vehicle not being enterable by other players. You can lock the doors & check if the player is the car owner under OnPlayerEnterVehicle()
Re: how to make not usefull vehicle? -
ancezas - 12.11.2013
Quote:
Originally Posted by Sinner
You can't "lock it in place", if that's what you mean. Try checking every X time if the vehicle is still in the position it's supposed to be and reset it to the correct position if it's not.
As for the vehicle not being enterable by other players. You can lock the doors & check if the player is the car owner under OnPlayerEnterVehicle()
|
and how do i need to check the poisition? i know whit timer, but how do check is car pos in place?
Re: how to make not usefull vehicle? -
ancezas - 12.11.2013
https://sampwiki.blast.hk/wiki/OnUnoccupiedVehicleUpdate
how about this? how do i not use it for every vehicle?
Re: how to make not usefull vehicle? -
Sinner - 12.11.2013
Quote:
Originally Posted by ancezas
and how do i need to check the poisition? i know whit timer, but how do check is car pos in place?
|
Store the vehicle ID somewhere when you create it. Then use GetVehiclePos()