28.07.2011, 00:11
i have a locking code which is:
how would i go about making it so i can lock it and unlock it from the outside because that way only allows me to lock and unlock from the inside
pawn Код:
CMD:vlock(playerid,params[])
{
new vid = GetPlayerVehicleID( playerid ), engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vid, engine, lights, alarm, doors, bonnet, boot, objective);
switch( vDoor[ vid ] )
{
case 0: vDoor[ vid ] = 1, SetVehicleParamsEx( vid, engine, lights, alarm, 1, bonnet, boot, objective ), SendClientMessage( playerid, -1, "Doors Locked." );
default: vDoor[ vid ] = 0, SetVehicleParamsEx( vid, engine, lights, alarm, 0, bonnet, boot, objective ),
SendClientMessage( playerid, -1, "Doors Unlocked." );
}
return 1;
}