Engine command
#1

pawn Код:
// out of script
new bool:VehEngine[MAX_VEHICLES];
//....
public OnVehicleSpawn(vehicleid)
{
    VehEngine[vehicleid] = false;
    return 1;
}
//....
CMD:engine(playerid,params[])
{
    new vehid = GetPlayerVehicleID(playerid);
    new engine, lights, alarm, doors, bonnet, boot, objective;
    GetVehicleParamsEx(vehid, engine, lights, alarm, doors, bonnet, boot, objective);
    if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER || GetPlayerState(playerid) != PLAYER_STATE_PASSENGER) return SendClientMessage(playerid,COLOR_GREY,"You must be inside a car !");
    if(VehEngine[vehid] == 0)//7184
    {
        SendClientMessage(playerid, COLOR_YELLOW, "You have turned your engine on.");
        VehEngine[vehid] = 1, SetVehicleParamsEx(vehid, 1, lights, alarm, doors, bonnet, boot, objective);//7187
        return 1;
    }
    if(VehEngine[vehid] == 1)//7190
    {
        SendClientMessage(playerid, COLOR_YELLOW, "You have turned your engine off.");
        VehEngine[vehid] = 0, SetVehicleParamsEx(vehid, 0, lights, alarm, doors, bonnet, boot, objective);//7193
        return 1;
    }
    return 1;
}
pawn Код:
D:\SAMP 0.3z\gamemodes\GM_X.pwn(7184) : warning 213: tag mismatch
D:\SAMP 0.3z\gamemodes\GM_X.pwn(7187) : warning 213: tag mismatch
D:\SAMP 0.3z\gamemodes\GM_X.pwn(7190) : warning 213: tag mismatch
D:\SAMP 0.3z\gamemodes\GM_X.pwn(7193) : warning 213: tag mismatch
What the hell is wrong ?
Reply
#2

It's a Boolean so it's only 'true/false' and can't be a number.
Reply
#3

aaa.... I'm so noobie
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)