Deploybarrel command sets the barrel in midair.
#1

pawn Код:
CMD:deploybarrel(playerid, params[])
{
    if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13 ||
    PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7 || PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pMember] == 6)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            SendClientMessageEx(playerid, COLOR_GREY, "You must be on foot to use this command.");
            return 1;
        }
        if(PlayerInfo[playerid][pRank] < 3 && PlayerInfo[playerid][pMember] != 2)
        {
            SendClientMessageEx(playerid, COLOR_GREY, "You need to be at least rank 3 to use this command.");
            return 1;
        }

        new string[128], Float:Position[4];
        for(new i; i<MAX_BARRELS; i++)
        {
            if(Barrel[i] == 0)
            {
                GetPlayerPos(playerid, Position[0], Position[1], Position[2]);
                GetPlayerFacingAngle(playerid, Position[3]);
                Barrel[i] = CreateDynamicObject(1237, Position[0], Position[1], Position[2], 0.0, 0.0, Position[3]+180.0, -1, -1, -1, 200.0);
                SetPlayerPos(playerid, Position[0], Position[1], Position[2]+5);
                new zone[MAX_ZONE_NAME];
                GetPlayer3DZone(playerid, zone, sizeof(zone));
                format(string, sizeof(string), "HQ: A Barrel/Cone has been deployed by %s at %s.", GetPlayerNameEx(playerid), zone);
                foreach(Player, x)
                {
                    if(IsACop(x))
                    {
                        SendClientMessageEx(x, TEAM_BLUE_COLOR, string);
                        if (PlayerInfo[x][pRank] >= 3)
                        {
                            SendClientMessageEx(x, COLOR_YELLOW, "You can remove a Barrel by typing /destroycade.");
                        }
                    }
                }
                return 1;
            }
        }
        SendClientMessageEx(playerid, COLOR_GREY, "All available barriers have been deployed.");
    }
    else
    {
        SendClientMessageEx(playerid, COLOR_GREY, "You are not an LEO.");
    }
    return 1;
}
Help it puts it in mid air thats only problem
Reply
#2

Just lower the Z value when creating the object? I don't see what your problem is?
Reply
#3

Quote:
Originally Posted by Vince
Посмотреть сообщение
Just lower the Z value when creating the object? I don't see what your problem is?
Which one Z i know it goes X, Y, Z this what it says what do I change
pawn Код:
Barrel[i] = CreateDynamicObject(1237, Position[0], Position[1], Position[2], 0.0, 0.0, Position[3]+0, -1, -1, -1, 200.0);
Reply
#4

the last -1 change it to like -5 or something
Reply
#5

Quote:
Originally Posted by Zach7
Посмотреть сообщение
Which one Z i know it goes X, Y, Z this what it says what do I change
pawn Код:
Barrel[i] = CreateDynamicObject(1237, Position[0], Position[1], Position[2]-1/*Here is the cool thing*/, 0.0, 0.0, Position[3]+0, -1, -1, -1, 200.0);
U happy now?
Reply
#6

Thank you I am happy I bumped earlier a bunch becuz everyone that viewed it just ignored me unlike you all who help me when I need it. THANX
Reply
#7

you will probably get infracted you bumped like 8 times just wait
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)