Engines wont start!
#1

Hello.

When someone types /engine the engine doesn't actually start!

please help!

pawn Код:
if(strcmp(cmd, "/engine", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(IsPlayerInAnyVehicle(playerid))
            {
                if(GetPlayerState(playerid) != PLAYER_STATE_PASSENGER)
                {
                    GetPlayerName(playerid, sendername, sizeof(sendername));
                    if(gEngine[playerid] == 0)
                    {
                        SCM(playerid, COLOR_PINK, "Car engine started.");
                        new engine, lights, alarm, doors, bonnet, boot, objective;
                        GetVehicleParamsEx(pveh, engine, lights, alarm, doors, bonnet, boot, objective);
                        SetVehicleParamsEx(pveh, 1, lights, alarm, doors, bonnet, boot, objective);
                        gEngine[playerid] = 1;
                        engineOn[pveh] = 1;
                        format(string, sizeof(string), "%s starts the car's engine.", sendername);
                        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                        return 1;
                    }
                    else if(gEngine[playerid] == 1)
                    {
                        SCM(playerid, COLOR_PINK, "Car engine stopped.");
                        new engine, lights, alarm, doors, bonnet, boot, objective;
                        GetVehicleParamsEx(pveh, engine, lights, alarm, doors, bonnet, boot, objective);
                        SetVehicleParamsEx(pveh, 0, lights, alarm, doors, bonnet, boot, objective);
                        gEngine[playerid] = 0;
                        engineOn[pveh] = 0;
                        format(string, sizeof(string), "%s stops the car's engine.", sendername);
                        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                        return 1;
                    }
                }
                else
                {
                    SCM(playerid, COLOR_CREAM, "You cannot start the engine as passenger.");
                    return 1;
                }
            }
            else
            {
                SCM(playerid, COLOR_CREAM, "You are not in a vehicle.");
                return 1;
            }
        }
    }
Reply


Messages In This Thread
Engines wont start! - by Oscii - 26.07.2012, 17:06
Re: Engines wont start! - by maramizo - 26.07.2012, 17:07
Re: Engines wont start! - by Oscii - 26.07.2012, 17:11
Re: Engines wont start! - by Oscii - 26.07.2012, 17:14
Re: Engines wont start! - by maramizo - 26.07.2012, 17:22
Re: Engines wont start! - by Oscii - 26.07.2012, 17:25
Re: Engines wont start! - by maramizo - 26.07.2012, 17:49
Re: Engines wont start! - by Oscii - 26.07.2012, 17:53
Re: Engines wont start! - by maramizo - 26.07.2012, 18:03
Re: Engines wont start! - by Oscii - 26.07.2012, 18:34

Forum Jump:


Users browsing this thread: 1 Guest(s)