Made /kick Command to Kick Player from Virtual World...
#9

Quote:
Originally Posted by MAFIAWARS
Посмотреть сообщение
Well, Thank you both. Now Please Fix my /elist Command.
And It is here:

pawn Код:
CMD:elist(playerid)
{
    if(pInfo[playerid][pWSELevel] > 1) return 0;
    if( GetPlayerVirtualWorld( playerid ) != 1 ) return SendClientMessage( playerid, COLOR_RED, "[ ! ] You can't use Event Commands in Real World !" );
    new bigString[ 512 ] = "{FFFFFF}Players in Event:",
        PlayerName[ MAX_PLAYER_NAME ],
        Playerid = -1,
        PlayerCount = 0
    ;

    while ( ++Playerid != MAX_PLAYERS ) {
        if ( !IsPlayerConnected(playerid) || GetPlayerVirtualWorld( playerid ) != 1 ) continue;
        GetPlayerName( Playerid, PlayerName, sizeof (PlayerName) );
        format( bigString, sizeof(bigString), "%s\n%i)\t%24s\t(ID: %i)", bigString, ++PlayerCount, PlayerName, Playerid );
    }
    if ( !PlayerCount ) strcat( bigString, "There is no players in the Event" );
    return ShowPlayerDialog( playerid, 1234, 0, "Players in event", bigString, "Close", "" );
}
It is Spamming my Dialog Box like that:

Players in Event:

1. MAFIA_WARS
2. MAFIA_WARS
3. MAFIA_WARS
4. MAFIA_WARS
5. MAFIA_WARS
6. MAFIA_WARS
7.MAFIA_WARS
etc
Help?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)