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

Here are the changes:
Quote:
Originally Posted by =KempeR=
Посмотреть сообщение
pawn Код:
if (sscanf(params, "u", playerid)) return SendClientMessage(playerid, COLOR_LIGHTGREEN, "[ ! ] USAGE: /ekick <playerid>");
new id, giveplayerid,
if( GetPlayerVirtualWorld( playerid ) != 1 ) return SendClientMessage( playerid, COLOR_RED, "[ ! ] This Player is not in Event !" );
SetPlayerVirtualWorld(id, 0);
Quote:
Originally Posted by Dragonsaurus
Посмотреть сообщение
pawn Код:
new giveplayerid;
if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_LIGHTGREEN, "[ ! ] USAGE: /ekick <playerid>");
if(GetPlayerVirtualWorld(giveplayerid) != 1) return SendClientMessage( playerid, COLOR_RED, "[ ! ] This Player is not in Event !" );
SetPlayerVirtualWorld(giveplayerid, 0);
Edit: Here is the /elist cmd:
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],
        PlayerCount = 0
    ;
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if (!IsPlayerConnected(i) || GetPlayerVirtualWorld(i) != 1) continue;
        GetPlayerName(i, PlayerName, sizeof(PlayerName));
        PlayerCount++;
        format(bigString, sizeof(bigString), "%s\n%i)\t%24s\t\t\t(ID: %i)", bigString, PlayerCount, PlayerName, i);
    }
    if (!PlayerCount) strcat(bigString, "There are no players in the Event");
    return ShowPlayerDialog(playerid, 1234, 0, "Players in event", bigString, "Close", "" );
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)