[FilterScript] Rcon Admin System v1 (ZCMD + SSCANF2)
#7

Quote:
Originally Posted by XStormiest
Посмотреть сообщение
wrong
pawn Код:
CMD:rkick(playerid, params[])

{

        new pID, reason[128], string[256], pName1[MAX_PLAYER_NAME], pName2[MAX_PLAYER_NAME];

    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1,"You are not Rcon Admin!");

        if(sscanf(params,"us[128]",pID,reason)) return SendClientMessage(playerid,-1, "[USAGE]:/rkick [Playerid/PartOfName] [Reason]");

        if (pID==INVALID_PLAYER_ID)SendClientMessage(playerid,-1,"[ERROR]:Player not found!");

    else if(!IsPlayerConnected(pID)) return SendClientMessage(playerid,-1,"[ERROR]:Player is not Connected!");

        else

        {

                GetPlayerName(playerid, pName1, sizeof(pName1));

                GetPlayerName(pID, pName2, sizeof(pName2));

                format(string, sizeof(string),"Rcon Admin %s has RKICK %s from this server ( Reason: %s )", pName1, pName2, reason);

        SendClientMessageToAll(-1, string);

        }

        return 1;

}
where is Kick(pID); ??.....
+ recomand you using foreach in next version gg nice for a begginer..

pawn Код:
CMD:rkick(playerid, params[])

{

        new pID, reason[128], string[256], pName1[MAX_PLAYER_NAME], pName2[MAX_PLAYER_NAME];

    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1,"You are not Rcon Admin!");

        if(sscanf(params,"us[128]",pID,reason)) return SendClientMessage(playerid,-1, "[USAGE]:/rkick [Playerid/PartOfName] [Reason]");

        if (pID==INVALID_PLAYER_ID)SendClientMessage(playerid,-1,"[ERROR]:Player not found!");

    else if(!IsPlayerConnected(pID)) return SendClientMessage(playerid,-1,"[ERROR]:Player is not Connected!");

        else

        {

                GetPlayerName(playerid, pName1, sizeof(pName1));

                GetPlayerName(pID, pName2, sizeof(pName2));

                format(string, sizeof(string),"Rcon Admin %s has RKICK %s from this server ( Reason: %s )", pName1, pName2, reason);

        SendClientMessageToAll(-1, string);
            Kick(pID);
        }

        return 1;

}
thanks for the info;
miss scripts xD
add Kick(pID);

anyway thanks all for the comment .
Reply


Messages In This Thread
Rcon Admin System v1 (ZCMD + SSCANF2) - by Devilxz97 - 29.07.2012, 09:30
Re: Rcon Admin System v1 (ZCMD + SSCANF2) - by [MK]Man_Deep - 29.07.2012, 14:33
Re: Rcon Admin System v1 (ZCMD + SSCANF2) - by Devilxz97 - 29.07.2012, 21:25
Re: Rcon Admin System v1 (ZCMD + SSCANF2) - by XStormiest - 29.07.2012, 21:35
Re: Rcon Admin System v1 (ZCMD + SSCANF2) - by P<3TS - 29.07.2012, 21:59
Re: Rcon Admin System v1 (ZCMD + SSCANF2) - by Majed - 29.07.2012, 22:26
Re: Rcon Admin System v1 (ZCMD + SSCANF2) - by Devilxz97 - 30.07.2012, 08:04
Re: Rcon Admin System v1 (ZCMD + SSCANF2) - by Shane_Kingston - 05.10.2012, 00:34
Re: Rcon Admin System v1 (ZCMD + SSCANF2) - by Lordzy - 05.10.2012, 01:35
Re: Rcon Admin System v1 (ZCMD + SSCANF2) - by DeadLy™ - 05.10.2012, 10:41

Forum Jump:


Users browsing this thread: 1 Guest(s)