Can somebody help me spot the problem with this code?
#1

pawn Код:
if(CarCheck == Cars[c12] )
        {
            if(gTeam[playerid] == TEAM_BALLAS)
            {
                if( PlayerInfo[playerid][level] >= 5)
                {
                    SendClientMessage(playerid, COLOUR_PURPLE, "You are now flying your teams Maverick!");
                }
                else
                {
                    SendClientMessage(playerid, COLOUR_RED, "You are not in the Ballas or you are not Level 5!");
                    RemovePlayerFromVehicle(playerid);
                }
            }
I've been looking for ages.When someone from the Ballas gets in it kicks them from the chopper saying they have to be level 5, that's what i want it to say but if someone from Grove, level 1 - 5 gets in it lets them fly even though the chopper is set for Ballas only. Anyone see the problem?
Reply
#2

pawn Код:
if( PlayerInfo[playerid][level] == 5)
Reply
#3

Quote:
Originally Posted by Logitech90
Посмотреть сообщение
pawn Код:
if( PlayerInfo[playerid][level] == 5)
Thanks for the swift reply, however this is just for the level not for the team.
Reply
#4

if(gTeam[playerid] == TEAM_BALLAS || gTeam[playerid] == TEAM_GROOVE)
Reply
#5

Quote:
Originally Posted by Jefff
Посмотреть сообщение
if(gTeam[playerid] == TEAM_BALLAS || gTeam[playerid] == TEAM_GROOVE)
That would let Grove get it the problem is that Grove is getting in the chopper and flying it when i dont want them to.
Reply
#6

pawn Код:
if(gTeam[playerid] == TEAM_BALLAS)
    {
        if( PlayerInfo[playerid][level] >= 5)
        {
            SendClientMessage(playerid, COLOUR_PURPLE, "You are now flying your teams Maverick!");
        }
        else
        {
             SendClientMessage(playerid, COLOUR_RED, "You are not level 5!");
             RemovePlayerFromVehicle(playerid);
        }
    }
    else
    {
        SendClientMessage(playerid, COLOUR_RED, "You are not in the Ballas team!");
        RemovePlayerFromVehicle(playerid);
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)