rentcar
#4

Why DOnt you try this?
Look at that 'else if'
Код:
CMD:engine(playerid,params[])
{
    new string[124];
    new id = GetVehicleID(GetPlayerVehicleID(playerid));
    new vehicleid = GetPlayerVehicleID(playerid);
    if(GetPlayerVehicleAccess(playerid, id) < 1)
        return SendClientMessage(playerid, COLOR_RED, "* You don't have the keys for this vehicle!");
    GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
    if(GetPlayerState(playerid) == 2)
    {
        if(engine != 1)
        {
            SetVehicleParamsEx(vehicleid, 1, 1, alarm, doors, bonnet, boot, 0);
            format(string, sizeof(string), "* %s turns the engine on.", GetName(playerid));
            ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        }
        else if(engine == 1) //<<<<<<<<<<<<<<<<<<<< Here ++++++++++++++++++
        {
            SetVehicleParamsEx(vehicleid, 0, 0, alarm, doors, bonnet, boot, 0);
            format(string, sizeof(string), "* %s turns the engine off.", GetName(playerid));
            ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        }
    }
    return 1;
}
Reply


Messages In This Thread
rentcar - by fonetic - 29.07.2014, 06:15
Re: rentcar - by Cannary2048 - 29.07.2014, 06:39
Re: rentcar - by fonetic - 29.07.2014, 07:15
Re: rentcar - by mjay768 - 29.07.2014, 07:22
Re: rentcar - by fonetic - 29.07.2014, 07:32
Re: rentcar - by mjay768 - 29.07.2014, 07:47
Re: rentcar - by fonetic - 29.07.2014, 08:23
Re: rentcar - by fonetic - 29.07.2014, 09:03
Re: rentcar - by mjay768 - 29.07.2014, 11:14
Re: rentcar - by fonetic - 29.07.2014, 17:14

Forum Jump:


Users browsing this thread: 6 Guest(s)