lundi 31 août 2015

ZCMD: Unknown command

/test is meant to tell me whether or not the vehicle I am sat in is a cop car or not. When performed inside of an FBI Rancher it returns "SERVER: Unknown Command
Code:

CMD:test(playerid, params[])
{
        new veh = GetPlayerVehicleID(playerid);
        if(IsACopCar(veh))
        {
                SendClientMessage(playerid, -1, "Car is a cop car.");
                return true;
        }
        return false;
}

Code:

public IsACopCar(vehicleid)
{
        new vm = GetVehicleModel(vehicleid);
        {
                if(VehicleList[vm - 400][VehType] == VEHICLE_TYPE_GOV) return true;
        }
        return false;
}


Code:

enum VehicleListEnum {
        VehModel,
        VehName[50],
        VehType,
        VehWindows,
        VehTrunk,
        VehDoors,
        VehPrice
};

new VehicleList[][VehicleListEnum] = {
{490, "FBI Rancher", VEHICLE_TYPE_GOV, 4, 1, 4, 000000},
};
// For example.



Aucun commentaire:

Enregistrer un commentaire