/engine bug
#1

Hello, I am having trouble with my /engine bug. If I leave another cars engine on and then enter another car and do /engine it says "Luis_Foxx turns off the vehicle", instead of "Luis_Foxx turns on the vehicle."..

pawn Код:
CMD:engine(playerid, params[])
{
    new vid = GetPlayerVehicleID(playerid);
    new Message[128], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "ERROR: You are not in a vehicle.");
    if(vid != INVALID_VEHICLE_ID)
    {
        if(engine == 0)
        {
            GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
            format(Message, sizeof(Message), "* %s turns on the vehicles engine.", name);
            nearByMessage(playerid, COLOR_PURPLE, Message);
            engine = 1;
        }
        else if(engine == 1)
        {
            GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
            format(Message, sizeof(Message), "* %s turns off the vehicles engine.", name);
            nearByMessage(playerid, COLOR_PURPLE, Message);
            engine = 0;
        }
    }
    return 1;
}
Reply


Messages In This Thread
/engine bug - by Luis- - 09.06.2011, 13:06
Re: /engine bug - by SkizzoTrick - 09.06.2011, 13:25
Re: /engine bug - by Luis- - 09.06.2011, 13:31
Re: /engine bug - by alpha500delta - 09.06.2011, 14:07
Re: /engine bug - by Luis- - 09.06.2011, 15:14
Re: /engine bug - by Luis- - 18.06.2011, 18:20
Re: /engine bug - by Luis- - 19.06.2011, 22:20
Re: /engine bug - by PrawkC - 19.06.2011, 23:26
Re: /engine bug - by kin - 19.06.2011, 23:45
Re: /engine bug - by PrawkC - 20.06.2011, 00:02

Forum Jump:


Users browsing this thread: 1 Guest(s)