SA-MP Forums Archive
<<<<<<<<please help >>>>>>>>> - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: <<<<<<<<please help >>>>>>>>> (/showthread.php?tid=265701)



<<<<<<<<please help >>>>>>>>> - MA_proking - 02.07.2011

I want to make a kick system for vip in lux admin, How can make that?
please tell me


Re: <<<<<<<<please help >>>>>>>>> - SmileyForCheat - 02.07.2011

Show Me The LINK!


Re: <<<<<<<<please help >>>>>>>>> - Deskoft - 02.07.2011

Congratulations on the professional and descriptive title.
Not sure who posted this, but It's in my old edit of luxadmin:
pawn Код:
dcmd_kick(playerid, params[])
{
    new
        pID,
        reason[24],
        string[128]
    ;

    #if !defined ADMIN_REJECT_MSG
    if(GetPVarInt(playerid, "Admin") < 3) return 0;
    #else
    if(GetPVarInt(playerid, "Admin") < 3) return SendError(playerid, ADMIN_REJECT_MSG);
    #endif

    else if(sscanf(params, "us", pID, reason)) SendUsage(playerid, "/kick [playerid] [reason]");
    else if(pID == INVALID_PLAYER_ID) return SendError(playerid, "Invalid playerid.");
    else if(pID == playerid) return SendError(playerid, "You cant kick yourself.");
    else if(GetPVarInt(pID, "Admin") > 1) return SendError(playerid, "You cannot use this command on admins");
    else
    {
        format(string, sizeof(string), "%s has been kicked by %s. (REASON: %s)", ReturnPlayerName(pID), ReturnPlayerName(playerid), reason);
        SendClientMessageToAll(COLOR_YELLOW, string);
        Kick(pID);
    }
    return 1;
}
EDIT: IT was Lorenc_


Re: <<<<<<<<please help >>>>>>>>> - MA_proking - 02.07.2011

for vip


Re: <<<<<<<<please help >>>>>>>>> - SmileyForCheat - 02.07.2011

Quote:
Originally Posted by Deskoft
Посмотреть сообщение
Congratulations on the professional and descriptive title.
Not sure who posted this, but It's in my old edit of luxadmin:
pawn Код:
dcmd_kick(playerid, params[])
{
    new
        pID,
        reason[24],
        string[128]
    ;

    #if !defined ADMIN_REJECT_MSG
    if(GetPVarInt(playerid, "Admin") < 3) return 0;
    #else
    if(GetPVarInt(playerid, "Admin") < 3) return SendError(playerid, ADMIN_REJECT_MSG);
    #endif

    else if(sscanf(params, "us", pID, reason)) SendUsage(playerid, "/kick [playerid] [reason]");
    else if(pID == INVALID_PLAYER_ID) return SendError(playerid, "Invalid playerid.");
    else if(pID == playerid) return SendError(playerid, "You cant kick yourself.");
    else if(GetPVarInt(pID, "Admin") > 1) return SendError(playerid, "You cannot use this command on admins");
    else
    {
        format(string, sizeof(string), "%s has been kicked by %s. (REASON: %s)", ReturnPlayerName(pID), ReturnPlayerName(playerid), reason);
        SendClientMessageToAll(COLOR_YELLOW, string);
        Kick(pID);
    }
    return 1;
}
EDIT: IT was Lorenc_
Change Admin Into VIP:
Код:
dcmd_kick(playerid, params[])
{
    new
        pID,
        reason[24],
        string[128]
    ;

    #if !defined ADMIN_REJECT_MSG
    if(GetPVarInt(playerid, "VIP") < 3) return 0;
    #else
    if(GetPVarInt(playerid, "VIP") < 3) return SendError(playerid, ADMIN_REJECT_MSG);
    #endif

    else if(sscanf(params, "us", pID, reason)) SendUsage(playerid, "/kick [playerid] [reason]");
    else if(pID == INVALID_PLAYER_ID) return SendError(playerid, "Invalid playerid.");
    else if(pID == playerid) return SendError(playerid, "You cant kick yourself."); //KICK HIM SLEP :D
    else if(GetPVarInt(pID, "VIP") > 1) return SendError(playerid, "You cannot use this command on admins");
    else
    {
        format(string, sizeof(string), "%s has been kicked by %s. (REASON: %s)", ReturnPlayerName(pID), ReturnPlayerName(playerid), reason);
        SendClientMessageToAll(COLOR_YELLOW, string);
        Kick(pID);
    }
    return 1;
}
//////////////////////////////////////////////////////////////////////////////////



Re: <<<<<<<<please help >>>>>>>>> - MA_proking - 02.07.2011

Код:
C:\DOCUME~1\Prabhat\Desktop\WORLDS~1.5\FILTER~1\viptest.pwn(84) : warning 217: loose indentation
C:\DOCUME~1\Prabhat\Desktop\WORLDS~1.5\FILTER~1\viptest.pwn(144) : warning 217: loose indentation
C:\DOCUME~1\Prabhat\Desktop\WORLDS~1.5\FILTER~1\viptest.pwn(172) : warning 203: symbol is never used: "dcmd_kick"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Warnings.
showing this


Re: <<<<<<<<please help >>>>>>>>> - alpha500delta - 02.07.2011

Means that you have to fix your indentation (tabs) and you probably never added "dcmd(kick, 4, params);" at OnGameModeInit.


Re: <<<<<<<<please help >>>>>>>>> - Deskoft - 02.07.2011

Use dracoblue's indentation fixer.

(Sent via iPhone)


Re: <<<<<<<<please help >>>>>>>>> - Odyssey - 02.07.2011

I suggest you have two commands, /vipkick for VIP's, and /kick for admins

Код:
dcmd_vipkick(playerid, params[])
{
    new
        pID,
        reason[24],
        string[128]
        ;

#if !defined ADMIN_REJECT_MSG
    if(GetPVarInt(playerid, "VIP") < 3) return 0;
#else
    if(GetPVarInt(playerid, "VIP") < 3) return SendError(playerid, ADMIN_REJECT_MSG);
#endif

    else if(sscanf(params, "us", pID, reason)) SendUsage(playerid, "/vipkick [playerid] [reason]");
    else if(pID == INVALID_PLAYER_ID) return SendError(playerid, "Invalid playerid.");
                                                  //KICK HIM SLEP :D << :P KICK HIM NAO!
    else if(pID == playerid) return SendError(playerid, "You cant kick yourself.");
    else if(GetPVarInt(pID, "VIP") > 1) return SendError(playerid, "You cannot use this command on admins");
    else {
        format(string, sizeof(string), "%s has been kicked by %s. (REASON: %s)", ReturnPlayerName(pID), ReturnPlayerName(playerid), reason);
        SendClientMessageToAll(COLOR_YELLOW, string);
        Kick(pID);
    }
    return 1;
}


//////////////////////////////////////////////////////////////////////////////////
Onto OnPlayerCommandText add this:

dcmd(vipkick, 7, cmdtext);

Hope I helped