Function GetSuperior/InferiorID
#1

Hi, I have a problem with my function GetSuperior(Inferior)Id. Result of a debug :

[DEBUG SUNSHINE (0)]: SUPERIOR 0 | INFERIOR 499

Result required : SUPERIOR 1 | INFERIOR 1
(We are 2 connected, me (ID0) and a player (ID1)).

Can you help me ?

PHP код:
stock GetSuperiorId(playerid)
{
    new
        
player;
    do if(
playerid >= MAX_PLAYERSplayer 0; else player++;
    while(!
IsPlayerConnected(player) && PlayerInfo[player][LoggedIn] == false && PlayerInfo[player][pInMenu] == true && playerid == player);
    return 
playerid;
}
stock GetInferiorId(playerid)
{
    new
        
player;
    do if(
playerid <= 0player 499; else player--;
    while(!
IsPlayerConnected(player) && PlayerInfo[player][LoggedIn] == false && PlayerInfo[player][pInMenu] == true && playerid == player);
    return 
player;

Reply


Messages In This Thread
Function GetSuperior/InferiorID - by YouServ - 27.03.2016, 18:42
Re: Function GetSuperior/InferiorID - by SickAttack - 27.03.2016, 18:55
Re: Function GetSuperior/InferiorID - by YouServ - 27.03.2016, 19:00
Re: Function GetSuperior/InferiorID - by SickAttack - 27.03.2016, 19:12
Re: Function GetSuperior/InferiorID - by YouServ - 27.03.2016, 19:25
Re: Function GetSuperior/InferiorID - by Konstantinos - 27.03.2016, 19:49
Re: Function GetSuperior/InferiorID - by SickAttack - 27.03.2016, 19:56
Re: Function GetSuperior/InferiorID - by YouServ - 27.03.2016, 20:40
Re: Function GetSuperior/InferiorID - by SickAttack - 27.03.2016, 20:43

Forum Jump:


Users browsing this thread: 1 Guest(s)