Lock and Cuff 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)
+--- Thread: Lock and Cuff Help (
/showthread.php?tid=317603)
Lock and Cuff Help -
SampFanss - 11.02.2012
i download cops and robbers game mode but the game mode dont have /cuff and /uncuff command and
/lock command (to lock vehicle,motorcyle,bike so people cant cajack it) could anyone tell me please? how to add /cuff,/uncuff,/lock command?
thanks
Re: Lock and Cuff Help -
Элиот - 11.02.2012
https://sampwiki.blast.hk/wiki/Category:..._Documentation
Re: Lock and Cuff Help -
SampFanss - 12.02.2012
Sorry i dont understand what is that?
Re: Lock and Cuff Help -
Dr.Heinz - 12.02.2012
for lock command.
1.) create
pawn Код:
new VehicleLocked[MAX_PLAYERS]; //this is at the top of script
2.) if you are using zcmd it will be look like this.
pawn Код:
CMD:lock(playerid, params[])
{
new vehicleid = GetPlayerVehicleID(playerid);
new vid = GetVehicleModel(vehicleid);
if(VehicleLocked[playerid] == 0)
{
//other codes
SetVehicleParamsForPlayer(vid, playerid, 0, 1); //sets vehicle door to lock
VehicleLocked[playerid] == 1; //sets VehicleLocked to 1
}
else //if vehiclelocked is 1
{
//other codes
SetVehicleParamsForPlayer(vid, playerid, 0, 0); //sets vehicle door to unlock
VehicleLocked[playerid] == 0;
}
return 1;
}
untested, but give it a try maybe it works
Re: Lock and Cuff Help -
SampFanss - 12.02.2012
i am sorry but i dont know where to put it and that cops and robber game mode dont use zcmd