(apagar) sff
#9

pawn Код:
if(strcmp("/sirene", cmdtext, true, 10) == 0)
    {
        if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 1)
        {
            new tmp[24], type, VID = GetPlayerVehicleID(playerid);
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_WHITE, "USA: /sirene [tipo]");
                SendClientMessage(playerid, COLOR_GRAD2, "Type: 1 = Em cima, 2 = Capф, 3 = Desligar.");
                return 1;
            }
            type = strval(tmp);
            if(type <= 0 || > 3)return SendClientMessage(playerid, COLOR_WHITE, "USA: /sirene [1 a 3]");
            if(type == 1)
            {
                if(Siren[VID] == 1)
                {
                    SendClientMessage(playerid, COLOR_GRAD2, "Este veнculo jб tкm sirene.!");
                    return 1;
                }
                new objectid = CreateObject(19419, 0, 0, 0, 0, 0, 0);
                AttachObjectToVehicle(objectid, GetPlayerVehicleID(playerid), 0.009999, -0.019999, 0.944999, 0.000000, 0.000000, 0.000000); //Object Model: 19419 |
                PlayerActionMessage(playerid,15.0,"coloca a sirene no veнculo.");
                return 1;
            }
            else if(type == 2)
            {
                if(Siren[VID] == 1)
                {
                    SendClientMessage(playerid, COLOR_GRAD2, "Este veнculo jб tкm sirene.!");
                    return 1;
                }
                Siren[VID] = 1;
                new sendername[MAX_PLAYER_NAME];
                GetPlayerName(playerid, sendername, sizeof(sendername));
                SirenObject[VID] = CreateObject(18646, 10.0, 10.0, 10.0, 0, 0, 0);
                AttachObjectToVehicle(SirenObject[VID], VID, -0.43, 0.0, 0.785, 0.0, 0.1, 0.0);
                PlayerActionMessage(playerid,15.0,"coloca a sirene no veнculo.");
                return 1;
            }
            else if(type == 3)
            {
                if(Siren[VID] == 0)
                {
                    SendClientMessage(playerid, COLOR_GRAD2, "Este veнculo nгo tкm sirene.!");
                    return 1;
                }
                Siren[VID] = 0;
                new sendername[MAX_PLAYER_NAME];
                GetPlayerName(playerid, sendername, sizeof(sendername));
                DestroyObject(SirenObject[VID]);
                PlayerActionMessage(playerid,15.0,"retira a sirene no veнculo.");
                return 1;
            }
        }
    }
    else SendClientMessage(playerid, COLOR_GREY, "You're not authorised to use this command.");
    return 1;
}
ve se estб a funcionar assim.
Reply


Messages In This Thread
params - by DreyPT - 08.06.2012, 15:50
Re: (apagar) sff - by DreyPT - 08.06.2012, 16:35
Re: (apagar) sff - by DrTHE - 08.06.2012, 17:05
Re: (apagar) sff - by DreyPT - 08.06.2012, 17:05
Re: (apagar) sff - by DrTHE - 08.06.2012, 17:11
Re: (apagar) sff - by DreyPT - 08.06.2012, 17:14
Re: (apagar) sff - by DrTHE - 08.06.2012, 17:17
Re: (apagar) sff - by DreyPT - 08.06.2012, 17:20
Re: (apagar) sff - by DrTHE - 08.06.2012, 17:23
Re: (apagar) sff - by DreyPT - 08.06.2012, 17:32

Forum Jump:


Users browsing this thread: 1 Guest(s)