vinfo cmd help
#1

Код:
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.");
}
I have created & registered vehicles in Vehicles folder, but when I do /vinfo, it says it's not registered although it is. What's seems to be wrong?
define is #define VEHICLE_FILE "Vehicles/%d.ini"
Reply


Messages In This Thread
vinfo cmd help - by Uberanwar - 27.05.2016, 11:54
Re: vinfo cmd help - by Amunra - 27.05.2016, 12:09
Re: vinfo cmd help - by Dayrion - 27.05.2016, 12:21

Forum Jump:


Users browsing this thread: 1 Guest(s)