Very small help
#1

I want to set a command to lock cars for all players. i use this function
Код:
SetVehicleParams(v, playerid, 0, 1);
But the car is only locked/unlocked for that player. WHy? how to solve this, If there is another function for it, what is its define or stock. Thanks
Reply
#2

These 2 functions I made should work:

http://pastebin.com/661tJXz8

I haven't tested them though.
Reply
#3

But i want to make same command to lock/unlock car, So how can i do that with the function u made?
Reply
#4

Look at the functions, you just need to use:

pawn Код:
LockVehicle(v);
UnlockVehicle(v);
if v is your vehicleid.
Reply
#5

just use this
UnlockVehicle(GetPlayerVehicleID(playerid));
LockVehicle(GetPlayerVehicleID(playerid));

in any cmds like
Код:
dcmd_lock(playerid,params[])
{
#pragma unused params
if(IsPlayerInVehicle(playerid,GetPlayerVehicleID(playerid)))
{
LockVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid,COLOR_RED,"Your vehicle is locked");
}
else return SendClientMessage(playerid,COLOR_RED,"Error:- You must be in a vehicle to execute this cmd");
return 1;
}
Reply
#6

Use SetVehicleParamsEx?.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)