Command problem (rep+)
#1

Well i was making /engine and when i use it outside a car it shows you are not driving a car (that works good) but when i enter a car as a driver and use it, it returns 0 to me
pawn Код:
CMD:engine(playerid, params[])
{
    if(GetPlayerState(playerid) != 2) return SendClientMessage(playerid,red,"ERROR: You are not driving a vehicle!");
    new vid = GetPlayerVehicleID(playerid);
    GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
    if(vengine[vid] == 0)
    {
        SetVehicleParamsEx( vid,1, lights, alarm, doors, bonnet, boot, objective );
        SendClientMessage(playerid,orange,"You have turned on your vehicle engine!");
        vengine[vid] = 1;
    }
    else if(vengine[vid] == 1)
    {
        SetVehicleParamsEx( vid,0, lights, alarm, doors, bonnet, boot, objective );
        SendClientMessage(playerid,orange,"You have turned off your vehicle engine!");
        vengine[vid] = 0;
    }
    return 1;
}
Reply


Messages In This Thread
Command problem (rep+) - by Tanush123 - 07.01.2012, 15:04
Re: Command problem (rep+) - by Konstantinos - 07.01.2012, 15:06
Re: Command problem (rep+) - by Tanush123 - 07.01.2012, 15:17
Re: Command problem (rep+) - by Konstantinos - 07.01.2012, 15:22
Re: Command problem (rep+) - by Tanush123 - 07.01.2012, 15:31

Forum Jump:


Users browsing this thread: 4 Guest(s)