[Help] Lightbars
#7

Fixed with:

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/code2", cmdtext, true, 6) == 0)
    {
        if (GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
        {
            return SendClientMessage(playerid, -1, "* You are not the driver!");
        }
        new pveh = GetPlayerVehicleID(playerid);
        if (!GetVehicleModel(pveh)) return SendClientMessage(playerid, -1, "* You are not in a vehicle!");
        if (VObject(obj[pveh])) return SendClientMessage(playerid, -1, "* You switched off the lights."), DObject(obj[pveh]), DObject(obj2[pveh]);
        switch (GetVehicleModel(pveh))
        {
            case 426:
            {
                obj[pveh] = CObject(19419, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
                obj2[pveh] = CObject(19419, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
                AObject(obj[pveh], pveh, 0.000000, -1.574999, 0.344999, -5.000000, 0.000000, 0.000000);
                AObject(obj2[pveh], pveh, 0.000000, 2.574999, 0.344999, -5.000000, 0.000000, 0.000000);
            }
            default:
            {
                return SendClientMessage(playerid, -1, "* You are not in a CODE 2 compatible police vehicle!");
            }
        }
        return SendClientMessage(playerid, -1, "* Lights on, you are now in a CODE 2 run!");
    }
    return 0;
}
Reply


Messages In This Thread
[Help] Lightbars - by BornHuman - 18.11.2013, 03:52
Re: [Help] Lightbars - by BornHuman - 18.11.2013, 09:38
Re: [Help] Lightbars - by Lajko1 - 18.11.2013, 12:49
Re: [Help] Lightbars - by BornHuman - 18.11.2013, 21:52
Re: [Help] Lightbars - by Lajko1 - 18.11.2013, 22:51
Re: [Help] Lightbars - by BornHuman - 18.11.2013, 23:02
Re: [Help] Lightbars - by BornHuman - 18.11.2013, 23:12

Forum Jump:


Users browsing this thread: 5 Guest(s)