07.07.2012, 11:21
So i made a litle impound cmd but its not working can ya help me ??
Here is what i added at /engine cmd:
and here is impounding cmd:
So whats wrong here ??
Here is what i added at /engine cmd:
Код:
if(impounded == 1) return SendClientMessage(playerid, COLOR_YELLOW, "Vehicle Is Impounded!");
Код:
CMD:impound(playerid, params[]) { new engine,lights,alarm,doors,bonnet,boot,objective; new vid, id, idn[MAX_PLAYER_NAME], n[MAX_PLAYER_NAME], str[288]; id = (strval(params)); GetPlayerName(playerid, n, sizeof(n)); if(!strlen(params)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /impound"); if(!IsPlayerInAnyVehicle(id)) return SendClientMessage(playerid, COLOR_GREY, "You are not in vehicle"); if(!IsACop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an SAPD Oficer."); vid = GetPlayerVehicleID(id); GetPlayerName(id, idn, sizeof(idn)); GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective); SetVehicleParamsEx(vid,0,lights,alarm,doors,bonnet,boot,objective); impounded = 1; format(str,sizeof(str),"LSPD officer %s, has impounded a vehicle", n, idn); SendClientMessageToAll(COLOR_YELLOW, str); return 1; }