Unmovable vehicle
#1

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

You could put them inside a non-destroyable object or have a special showroom for them where it just specs a few cars.
Reply
#3

Thanks. I will probably leave them movable for now. I will see if players will push them away or not.
Reply
#4

PHP код:
TogglePlayerControllable(playerid,0); 
Reply
#5

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
Reply
#6

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

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

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

Quote:
Originally Posted by Shadoww5
Посмотреть сообщение
I thought the player was in the vehicle ...

From what I understood, you would use https://sampwiki.blast.hk/wiki/SetVehicleParamsEx.
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.
Reply
#10

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


Forum Jump:


Users browsing this thread: 4 Guest(s)