18.02.2013, 22:52
hey everyone
i worked on a /lights command and everytime i put the command in the server all the commands stop working.. can someone help me
i worked on a /lights command and everytime i put the command in the server all the commands stop working.. can someone help me
Код:
if(strcmp(cmd, "/lights", true) == 0 || strcmp(cmd, "/l", true) == 0) // by LordMan { if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_GREY, "You need to be the vehicle driver, to switch the lights on/off."); if(vlights[playerid] == 1) { new vehicleid = GetPlayerVehicleID(playerid); new e,l,a,d,b,bo,o; GetVehicleParamsEx(vehicleid,e,l,a,d,b,bo,o); SetVehicleParamsEx(vehicleid,e,0,a,d,b,bo,o); vlights[playerid] = 0; OnPropUpdate(4,vehicleid); new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "%s turns off the vehicle lights.", name); ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5); } else if(vlights[playerid] == 0) { new vehicleid = GetPlayerVehicleID(playerid); new e,l,a,d,b,bo,o; GetVehicleParamsEx(vehicleid,e,l,a,d,b,bo,o); SetVehicleParamsEx(vehicleid,e,1,a,d,b,bo,o); vlights[playerid] = 1; OnPropUpdate(4,vehicleid); new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "%s turns on the vehicle lights.", name); ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5); } return 1; }