/unban Command.
#1

Hi,
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;
}
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?
Reply


Messages In This Thread
/unban Command. - by Edvin - 01.11.2011, 13:09
Re: /unban Command. - by =WoR=G4M3Ov3r - 01.11.2011, 13:22
Re: /unban Command. - by IstuntmanI - 01.11.2011, 14:06
Re: /unban Command. - by =WoR=G4M3Ov3r - 01.11.2011, 14:37
Re: /unban Command. - by Edvin - 01.11.2011, 16:14

Forum Jump:


Users browsing this thread: 5 Guest(s)