27.05.2016, 11:54
Код:
CMD:vinfo(playerid, params[]) { new string[240], vid, loc[30]; format(loc, sizeof(loc), VEHICLE_FILE, vid); new model = vInfo[vid][Model]; new type = vInfo[vid][Type]; new faction = vInfo[vid][Faction]; new col1 = vInfo[vid][ColorA]; new col2 = vInfo[vid][ColorB]; new plate = vInfo[vid][Plate]; new siren = vInfo[vid][Siren]; if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "{8EB2D6}SERVER:{FFFFFF} You need to be in a vehicle in order to do this command!"); if(pInfo[playerid][Admin] < 1) return SendClientMessage(playerid, -1, "{8EB2D6}SERVER:{FFFFFF} You need to be an admin in order to do this command!"); if(fexist(loc)) { format(string, sizeof(string), "{8EB2D6}SERVER:{FFFFFF} [VID: %d | Model: %d | Type: %d | Faction: %d | Color: %d | Color: %d | Plate: %d | Siren: %d]", vid, model, type, faction, col1, col2, plate, siren); SendClientMessage(playerid, -1, string); return true; } else return SendClientMessage(playerid, -1, "{8EB2D6}[INFO]{FFFFFF}: This vehicle is not registered in the database."); }
define is #define VEHICLE_FILE "Vehicles/%d.ini"