need a small cmd
#3

pawn Код:
if(PVar[playerid][pLevel] >= 99999) //level 99999 admin
pawn Код:
CMD:unwarn( playerid, params[ ] )
{
    if(PVar[playerid][pLevel] < 99999) //level 99999 admin
           return SendClientMessage( playerid, -1, "Only admins level 99999 can use this command."
       
    new tempname, temptext[ 128 ]
    if ( sscanf( params, "us[128]", tempname, temptext ) )
        return SendClientMessage( playerid, -1, "Usage: /unwarn <PlayerID> [reason]");

    if ( !IsPlayerConnected( tempname ) )
        return SendClientMessage( playerid, -1, "Player is not connected.");

    SetPVarInt( tempname, "Warnings", GetPVarInt( tempname, "Warnings") - 1 );
   
    new String[ 50 ];
    format( String, sizeof( String ), "Admin %u unwarned you.", playerid );
    SendClientMessage( tempname, -1, String );
   
    format( String, sizeof( String ), "You unwarned player %u for %s.", tempname, temptext );
    SendClientMessage( playerid, -1, String );
    return 1;
}
Reply


Messages In This Thread
need a small cmd - by mhamadsaleh - 13.12.2011, 21:22
Re: need a small cmd - by [ABK]Antonio - 13.12.2011, 21:31
Re: need a small cmd - by Neo Karls - 13.12.2011, 23:12
Re: need a small cmd - by Neo Karls - 13.12.2011, 23:14
Re: need a small cmd - by mhamadsaleh - 14.12.2011, 18:00
Re: need a small cmd - by mhamadsaleh - 14.12.2011, 19:04
Re: need a small cmd - by Kostas' - 14.12.2011, 19:23
Re: need a small cmd - by mhamadsaleh - 15.12.2011, 20:43
Re: need a small cmd - by Kostas' - 16.12.2011, 12:29

Forum Jump:


Users browsing this thread: 4 Guest(s)