my cars not lock with ths code [HELP]HELP
#1

hello here is my code when i add this its not lock vehicles in my tdm server i want to lock all cars or tell me where i add this players sill drives vehicles and i dontwant they drive just fight
pawn Код:
//==========================Vehicles lock for ever==============================
    new engine,lights,alarm,doors,bonnet,boot,objective;
    for(new i = 0; i < MAX_VEHICLES; i ++)
    {
    GetVehicleParamsEx(i,engine,lights,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(i,0,lights,alarm,doors,bonnet,boot,objective);
    }
plz check the code i use it OnGameModeINT plz help
Reply
#2

Your turning the engine off, not locking the car.
Reply
#3

how i loc cars
plz give me code!!!!!
Reply
#4

Код:
new engine,lights,alarm,doors,bonnet,boot,objective;
    for(new i = 0; i < MAX_VEHICLES; i ++)
    {
    GetVehicleParamsEx(i,engine,lights,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(i,engine,lights,alarm,1,bonnet,boot,objective);
    }
Reply
#5

i add u and wait i try if its work
Reply
#6

ah first tell me where i add the code and 2nd i add it on gamemodeit and i still enter in ehicle
Reply
#7

https://sampwiki.blast.hk/wiki/Function:...aramsForPlayer
Reply
#8

Use
PHP код:
public OnPlayerEnterVehicle(playerid,vehicleid,ispassenger)
{
    
SetVehicleParamsForPlayer(vehicleid,playerid,0,1);
    return 
1;

Reply
#9

If you want to lock them when the server start you can loop them in your OnGameModeInit()
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)