This isn't working correctly. Why?
#1

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:
PHP код:
CMD:checkplate(playeridparams[])
{
    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_iHandleMAX_PLAYER_NAME+1));
    
SendClientMessage(playeridCOLOR_GREENstring);
    return 
1;

CarData Enum:
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
}; 
+REP
Reply


Messages In This Thread
This isn't working correctly. Why? - by MineiriinHo - 02.11.2016, 00:36
Re: This isn't working correctly. Why? - by AndySedeyn - 02.11.2016, 00:42
Re: This isn't working correctly. Why? - by MineiriinHo - 02.11.2016, 00:44
Re: This isn't working correctly. Why? - by iLearner - 02.11.2016, 07:25
Re: This isn't working correctly. Why? - by justjamie - 02.11.2016, 08:16
Re: This isn't working correctly. Why? - by Vince - 02.11.2016, 08:41

Forum Jump:


Users browsing this thread: 2 Guest(s)