Siren help
#4

Couple more things wrong
pawn Код:
//top of script
new sirenstatus[MAX_PLAYERS];
new SirenObject[MAX_VEHICLES];//also outside of the cmd becouse it will forget the id
if(!strcmp(cmd,"/siren", true))
    {
        if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 3 || IsAFreecop(playerid))
        {
            new VID = GetPlayerVehicleID(playerid);
            if (sirenstatus[playerid] == 0)
            {
                SirenObject[VID] = CreateObject(19419, 0, 0, 0, 0, 0, 0);
                AttachObjectToVehicle(SirenObject[VID], VID, 0.009999, -0.019999, 0.944999, 0.000000, 0.000000, 0.000000);
                sirenstatus[playerid] = 1;
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Undercover, Siren added!");
                return 1;
            }
            else if(sirenstatus[playerid] == 1)
            {
                DestroyObject(SirenObject[VID]);
                sirenstatus[playerid] = 0;
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Undercover, Siren removed!");
                return 1;
            }
        }
        return 1;
    }
Reply


Messages In This Thread
Siren help - by UnknownGamer - 28.11.2012, 20:57
Re: Siren help - by park4bmx - 28.11.2012, 21:01
Re: Siren help - by UnknownGamer - 28.11.2012, 21:02
Re: Siren help - by park4bmx - 28.11.2012, 21:09

Forum Jump:


Users browsing this thread: 2 Guest(s)