SA-MP Forums Archive
What's wrong with this? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: What's wrong with this? (/showthread.php?tid=275350)



What's wrong with this? - Outcast - 09.08.2011

pawn Код:
public StartFixing(playerid, vehicleid)
{
    new engine, lights, alarm, doors, bonnet, boot, objective;
    GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
    if(bonnet == VEHICLE_PARAMS_OFF) return SendClientMessage(playerid, 0xFF0000AA, "[ERROR] You have to open your bonnet first");
    if(engine == VEHICLE_PARAMS_ON) return SendClientMessage(playerid, 0xFF0000AA, "[ERROR] You have to turn off your engine first");
    ApplyAnimation(playerid, "BD_Fire", "BD_Panic_Loop", 2, 1, 0, 0, 1, 0, 1);
    return 1;
}
It just skips the part where it checks if the bonnet is opened or closed. I don't know what's wrong with this.


Re : What's wrong with this? - jasonnw666 - 09.08.2011

yes but what you want to do xd


Re: What's wrong with this? - admantis - 09.08.2011

pawn Код:
public StartFixing(playerid, vehicleid)
{
    new engine, lights, alarm, doors, bonnet, boot, objective;
    GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
    if(bonnet) return SendClientMessage(playerid, 0xFF0000AA, "[ERROR] You have to open your bonnet first");
    if(engine) return SendClientMessage(playerid, 0xFF0000AA, "[ERROR] You have to turn off your engine first");
    ApplyAnimation(playerid, "BD_Fire", "BD_Panic_Loop", 2, 1, 0, 0, 1, 0, 1);
    return 1;
}



Re: What's wrong with this? - MadeMan - 09.08.2011

pawn Код:
public StartFixing(playerid, vehicleid)
{
    new engine, lights, alarm, doors, bonnet, boot, objective;
    GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
    if(bonnet != VEHICLE_PARAMS_ON) return SendClientMessage(playerid, 0xFF0000AA, "[ERROR] You have to open your bonnet first");
    if(engine == VEHICLE_PARAMS_ON) return SendClientMessage(playerid, 0xFF0000AA, "[ERROR] You have to turn off your engine first");
    ApplyAnimation(playerid, "BD_Fire", "BD_Panic_Loop", 2, 1, 0, 0, 1, 0, 1);
    return 1;
}