Very small help - 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: Very small help (
/showthread.php?tid=248920)
Very small help -
Swiftz - 16.04.2011
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
Re: Very small help -
Calgon - 16.04.2011
These 2 functions I made should work:
http://pastebin.com/661tJXz8
I haven't tested them though.
Re: Very small help -
Swiftz - 16.04.2011
But i want to make same command to lock/unlock car, So how can i do that with the function u made?
Re: Very small help -
Calgon - 16.04.2011
Look at the functions, you just need to use:
pawn Код:
LockVehicle(v);
UnlockVehicle(v);
if v is your vehicleid.
Re: Very small help -
Unknown1234 - 16.04.2011
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;
}
Re: Very small help -
[BKR]LUCAGRABACR - 17.04.2011
Use SetVehicleParamsEx?.