02.11.2016, 00:36
I use a gamemode with SQL.. And, I'm trying create a command, but he doesn't want to work..
Can your help me?
The error is, the car owner name, doesn't show....
The command:
CarData Enum:
+REP
Can your help me?
The error is, the car owner name, doesn't show....
The command:
PHP код:
CMD:checkplate(playerid, params[])
{
new
id = 0,
string[128];
if (GetFactionType(playerid) != FACTION_POLICE)
return SendErrorMessage(playerid, "You needs be a cop.");
if (sscanf(params, "d", id))
return SendSyntaxMessage(playerid, "/checkplate [vehicleid]");
if (!IsValidVehicle(id) || Car_GetID(id) == -1)
return SendErrorMessage(playerid, "You specified an invalid ID.");
format(string,sizeof(string),"The owner of this car it's %s.", cache_get_field_content(id, "carOwner", CarData[id][carOwner], g_iHandle, MAX_PLAYER_NAME+1));
SendClientMessage(playerid, COLOR_GREEN, string);
return 1;
}
PHP код:
enum carData {
carID,
carExists,
carModel,
carOwner[MAX_PLAYER_NAME],
Float:carPos[4],
carColor1,
carColor2,
carPaintjob,
carLocked,
carMods[14],
carImpounded,
carImpoundPrice,
carFaction,
carWeapons[5],
carAmmo[5],
carVehicle
};