09.02.2013, 22:51
Hi. i have a /lockcar.how to make it like if you go in a car you type /lockcar and get out of the car you can't go back in it.i wanna it auto opens.
Here my Code:
Here my Code:
Код:
CMD:lock(playerid, params[]) { #pragma unused params {//Dont Remove dis. if(IsPlayerInAnyVehicle(playerid)) { for(new i = 0; i < MAX_PLAYERS; i++) SetCarLockedState(GetPlayerVehicleID(playerid),i,false,true); SendClientMessage(playerid,SUCCESS,"Your car has been locked!"); return 1; } else return SendClientMessage(playerid,COLOR_ERROR,"ERROR: You need to be in a vehicle"); } } CMD:unlock(playerid, params[]) { #pragma unused params if(IsPlayerAdmin(playerid)) {//Don't Remove dis. if(IsPlayerInAnyVehicle(playerid)) { for(new i = 0; i < MAX_PLAYERS; i++) SetCarLockedState(GetPlayerVehicleID(playerid),i,false,false); SendClientMessage(playerid,SUCCESS,"Your car has been unlocked!"); return 1; } else return SendClientMessage(playerid,COLOR_ERROR,"ERROR: You need to be in a vehicle to unlock your veh."); } }