/lock script passengers allowed
#1

Well I have here a /lock script, But when I do use /lock. It locks everything passenger and back seats.
And i only want to lock the driver's seat. How?

Код:
CMD:lock(playerid, params[])
{
	new Float:X, Float:Y, Float:Z;
	new vehicleid = GetPlayerVehicleID(playerid);
	GetVehiclePos(vehicleid, X, Y, Z);
	if (!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "ERROR: You must be in a vehicle to use this command!");
	{
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
	SetVehicleParamsForPlayer(vehicleid,i,0,1);
	GameTextForPlayer(playerid, "~y~Vehicle ~r~Locked", 2000, 3);
	}
	}
	return 1;
}
Reply
#2

You can't just lock only one door. It'll lock all of them.
Reply
#3

Quote:
Originally Posted by Steven82
Посмотреть сообщение
You can't just lock only one door. It'll lock all of them.
So can you make script have unlock command? When player do /lock it also unlock the vehicle (Only Driver can use /lock) and a GameTextForPlayer appear "Vehicle Unlock"
Reply
#4

https://sampforum.blast.hk/showthread.php?tid=246878
https://sampforum.blast.hk/showthread.php?tid=9584
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)