Unmovable vehicle - 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: Unmovable vehicle (
/showthread.php?tid=265505)
Unmovable vehicle -
StandaxXx - 01.07.2011
Hello,
I just encountered a problem. I want to make a car dealer and I want to have some vehicle models nearby, so the player knows what he is buying. The cars will have a 3D text with a price (that is not a problem) and they will be impossible to move. That problem is especialy with bikes, because players can push them just by running. Is there some function to make them unmovable, or do I have to reset their position with a timer?
THX for all answers.
Re: Unmovable vehicle -
[HiC]TheKiller - 01.07.2011
You could put them inside a non-destroyable object or have a special showroom for them where it just specs a few cars.
Re: Unmovable vehicle -
StandaxXx - 01.07.2011
Thanks. I will probably leave them movable for now. I will see if players will push them away or not.
Re: Unmovable vehicle -
Shadoww5 - 01.07.2011
PHP код:
TogglePlayerControllable(playerid,0);
Re: Unmovable vehicle -
sansko - 01.07.2011
make an area were they cannot enter a vehicle
like
pawn Код:
onPlayerEnterExitVehicle(playerid, vehicleid)
{
If(isPlayerInArea)
{
SetPlayerAnim(playerid, animid) //something that stops the anim
}
return 1;
}
or make a timer wich sets the veicles back to their positions
Re: Unmovable vehicle -
BigETI - 01.07.2011
Quote:
Originally Posted by Shadoww5
PHP код:
TogglePlayerControllable(playerid,0);
|
/facepalm
This will just freeze the Player not the vehicle itself.
Use a timer to respawn the vehicle in a certain time.
Re: Unmovable vehicle -
Shadoww5 - 01.07.2011
Quote:
Originally Posted by BigETI
/facepalm
This will just freeze the Player not the vehicle itself.
Use a timer to respawn the vehicle in a certain time.
|
I thought the player was in the vehicle ...
From what I understood, you would use
https://sampwiki.blast.hk/wiki/SetVehicleParamsEx.
Re: Unmovable vehicle -
[HiC]TheKiller - 01.07.2011
You guys don't seem to understand what this guy is trying to say. He wants it so you cannot move the car in any way. You can easily push cars/bikes with other cars/bikes or your player. He is trying to find a way to prevent this because if the cars are moved, you have to move the 3Dtext's as well.
Re: Unmovable vehicle -
BigETI - 01.07.2011
Quote:
Originally Posted by Shadoww5
|
Well if an player has been freezed inside a car so the drive can't drive the car but still the vehicle is movable.
Quote:
Originally Posted by [HiC
TheKiller]You guys don't seem to understand what this guy is trying to say. He wants it so you cannot move the car in any way. You can easily push cars/bikes with other cars/bikes or your player. He is trying to find a way to prevent this because if the cars are moved, you have to move the 3Dtext's as well.
|
That's why I have said that he should use a timer to respawn the vehicle all the time.
Re: Unmovable vehicle -
Shadoww5 - 01.07.2011
Quote:
Originally Posted by BigETI
Well if an player has been freezed inside a car so the drive can't drive the car but still the vehicle is movable.
|
No, if the player is freezed the car can't be moved.