strange bug
#1

Hi,
1st I'm very happy if anybody can help me, because I think its a strange bug.
So I have a "Minister" Class in my server, that can people choose.
People can only choose this class (not Team), if he is rank 6. But a other who isn't rank 6 can choose them (he is rank 4)..
At me the barrier work, at other too but on this player (or maybe more, i only saw that on him) not..

my code:

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
...
    if(newkeys == KEY_JUMP)
    {
        if(ClassSet[playerid] == 9 && RequestClass[playerid] == 0)
        {
            if(WasMinister[playerid] == 1)
            {
                SendClientMessage(playerid,_COLOR_WHITE,"You must wait 20 minutes to select MINISTER again !");
                return 1;
            }
            else if(Rank[playerid] >= 6)
            {
                foreach(Player,i)
                {
                    if(gTeam[playerid] == gTeam[i] && RequestClass[i] == 1 && ClassSet[i] == 9)
                    {
                    new string[128];
                    GetPlayerName(i,playername,sizeof(playername));
                    format(string,sizeof(string),"%s is already Minister !",playername);
                    SendClientMessage(playerid,_COLOR_WHITE,string;
                    return 1;
                    }
                }
            }
            else
            {
                SendClientMessage(playerid,_COLOR_WHITE,"You must are a GENERAL.");
                return 1;
            }
        }
    }
...
    return 1;
}
I think the If query "WasMinister" won't work too for him..

In the beginning, i had it so:

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
...
    if(newkeys == KEY_JUMP)
    {
        if(ClassSet[playerid] == 9 && RequestClass[playerid] == 0)
        {
            if(Rank[playerid] < 6)
            {
                SendClientMessage(playerid,_COLOR_WHITE,"You must be a GENERAL.");
                return 1;
            }
            if(WasMinister[playerid] == 1)
            {
                SendClientMessage(playerid,_COLOR_WHITE,"You must wait 20 minutes to select MINISTER again !");
                return 1;
            }
                foreach(Player,i)
                {
                    if(gTeam[playerid] == gTeam[i] && RequestClass[i] == 1 && ClassSet[i] == 9)
                    {
                    new string[128];
                    GetPlayerName(i,playername,sizeof(playername));
                    format(string,sizeof(string),"%s is already Minister !",playername);
                    SendClientMessage(playerid,_COLOR_WHITE,string;
                    return 1;
                    }
                }
            }
        }
    }
...
    return 1;
}
Reply
#2

help please...
Reply
#3

annother bump
Reply
#4

So you want to know how to fix the WasMinister problem?
Sorry but your english is hard to understand
Reply
#5

no.. The problem is he can select the minister class altough he don't has the highest rank.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)