01.11.2011, 13:09
Hi,
I try to make an /unban command. I use LAdmin4v2 edited with ZCMD, SScanf and foreach!
Here is the command:
When i type /unban Existent account in scriptfiles it shows me: "Command /unban accountname doesn't not exist...", but when i type /unban unexisten account in scriptfiles it tells me true: "ERROR: This player doesnt have an account"
What's the problem with that command?
I try to make an /unban command. I use LAdmin4v2 edited with ZCMD, SScanf and foreach!
Here is the command:
Код:
CMD:unban( PARAMS )
{
LevelCheck( playerid, 10 );
LoginCheck( playerid );
if ( sscanf( params, "s[128]", params[0] ) ) return SendClientMessage( playerid, COLOR_ULTRARED, "USAGE: {33CCFF}/unban [Player Name]" );
new file[ 128 ];
format( file, 128, "/ladmin/users/%s.sav", params[0] );
if ( !udb_Exists( file ) ) return SendClientMessage( playerid, COLOR_ULTRARED, "ERROR: This player doesnt have an account" );
dUserSetINT( params[0] ).( "Banned", 0 );
PlayerPlaySound( playerid, 1057, 0.0, 0.0, 0.0 );
FormatMSG( playerid, COLOR_YELLOW, "Account '%s' has been succes fully UnBanned!", params[0] );
return 1;
}
What's the problem with that command?


