18.09.2012, 03:21
why does it lags every time i do a cmd?
next thing iz how to make a player unlock vehicle while outside the car?
next thing iz how to make a player unlock vehicle while outside the car?
Код:
CMD:vlock(playerid, params[]) { new engine, lights, alarm, doors, bonnet, boot, objective, vehicleid, string[128]; if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_GREY, "You are not driving a vehicle."); if(vehicleid == 509 || vehicleid == 481 || vehicleid == 510) return SendClientMessage(playerid, COLOR_GREY, "Bicycles have no engine."); vehicleid = GetPlayerVehicleID(playerid); GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective); if(!doors) { SetVehicleParamsEx(vehicleid, engine, lights, alarm, 1, bonnet, boot, objective); format(string, sizeof(string), "* %s Locked there car doors.", RPN(playerid)); SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE); } else { SetVehicleParamsEx(vehicleid, engine, lights, alarm, 0, bonnet, boot, objective); format(string, sizeof(string), "* %s Unlocked there doors.", RPN(playerid)); SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE); } return 1; }