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

@=KempeR=: You are doing it wrong. Here it's the final version:
pawn Код:
CMD:ekick(playerid, params[])
{
    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 giveplayerid,
    if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_LIGHTGREEN, "[ ! ] USAGE: /ekick <playerid>");
    PlayerName[MAX_PLAYER_NAME], str_[100];
    GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
    if(GetPlayerVirtualWorld(giveplayerid) != 1) return SendClientMessage( playerid, COLOR_RED, "[ ! ] This Player is not in Event !" );
    SetPlayerVirtualWorld(giveplayerid, 0);
    format(str_, 62, "[ ! ] %s has been kicked out from the event !", PlayerName);
    SendClientMessageToAll(COLOR_PURPLE, str_);
    format(str_, sizeof str_, "[ ! ] You have kicked %s from Event !", PlayerName);
    SendClientMessage(playerid, COLOR_PURPLE, str_);
    SendClientMessage(giveplayerid, COLOR_PURPLE, "[ ! ] You have been kicked out from the Event !");
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)