SA-MP Forums Archive
Help me - 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)
+--- Thread: Help me (/showthread.php?tid=406988)



Help me - mittukuttan - 12.01.2013

Код:
CMD:kick( playerid, params[])
{
    if( !IsPlayerAdmin( playerid ) ) return SendClientMessage( playerid, 0xFF0000FF, " You are not allowed to do that!" );
    new pID,
    reason[ 64 ];
    if( sscanf( params, "us[64]", pID, reason ) ) return SendClientMessage( playerid, -1, " USAGE:/kick [playerid/name] [reason]" );
    if( pID == INVALID_PLAYER_ID ) return SendClientMessage( playerid, 0xFF0000FF, " That player is not connected!" );
    new aName[ MAX_PLAYER_NAME ],
    pName[ MAX_PLAYER_NAME ],
    kickstring[ 128 ];
    GetPlayerName( playerid, aName, MAX_PLAYER_NAME );
    GetPlayerName( pID, pName, MAX_PLAYER_NAME );
    format( kickstring, sizeof( kickstring ), "AdmCmd:%s has kicked %s for : %s", aName, pName, reason );
    SendClientMessageToAll( 0xFF0000FF, kickstring );
    Kick( pID );
    return 1;
	}
This my kick command but add it to ur script and run it and see if u can kick someone it can't y.


Re: Help me - mittukuttan - 12.01.2013

cmon help me


Re: Help me - Shetch - 12.01.2013

Do you get an error message or what?
If so, you need to be logged in as an RCON admin.
/rcon login [pass]