Ban - Dont Work! -
Akcent_Voltaj - 09.11.2012
a friend made me a ban permanent thingy please help!the cmd doesent work!
PHP код:
dcmd_testban(playerid, params[]) // BAN
{
if(PlayerInfo[playerid][pAdmin] >= 1339)
{
new Target;
new Reason[100];
if(!sscanf(params, "us[100]", Target,Reason))
{
if(Target == playerid) return SendClientMessage(playerid,-1,"lol want to ban your self?");
new tname[MAX_PLAYER_NAME];
GetPlayerName(Target,tname,sizeof(tname));
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
new MyString[256];
new TargetString[256];
new rbandate[3];
getdate(rbandate[0],rbandate[1],rbandate[2]);
format(MyString,sizeof(MyString),"You Have Banned %s(%d)! (Reason %s)",tname, Target,Reason);
ShowPlayerDialog(playerid, 1000, DIALOG_STYLE_MSGBOX,"You Have Been Banned :(",TargetString, "OK", "");
SendClientMessageToAll(-1,MyString);
new AllString[256];
format(AllString,sizeof(AllString),"Admin %s has banned player %s(%d)! Reason(%s)", pname,tname,Target,Reason);
SendClientMessageToAll(-1,AllString);
new ip[50];
GetPlayerIp(Target,ip,sizeof(ip));
strdel(ip,strlen(ip)-4,strlen(ip));
format(ip,sizeof(ip),"%s**.**",ip);
format(ip,sizeof(ip),"banip %s",ip);
SendRconCommand(ip);
Ban(Target);
}
}
return 1;
}
dcmd_test(playerid, params[]) // UNBAN
{
if(PlayerInfo[playerid][pAdmin] >= 1339)
{
new ip[32], dformat[64];
if(sscanf(params,"s[32]",ip)) return SendClientMessage(playerid,-1,"/test [ip]");
format(dformat, sizeof(dformat),"unban %s",ip);
SendRconCommand(dformat);
}
return 1;
}
Re : Ban - Dont Work! -
yusei - 09.11.2012
PHP код:
dcmd_testban(playerid, params[]) // BAN
{
new Target;
new Reason[100];
if(PlayerInfo[playerid][pAdmin] >= 1339)
{
if(!sscanf(params, "us[100]", Target,Reason))
{
if(Target == playerid) return SendClientMessage(playerid,-1,"lol want to ban your self?");
new tname[MAX_PLAYER_NAME];
GetPlayerName(Target,tname,sizeof(tname));
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
new MyString[256];
new TargetString[256];
new rbandate[3];
getdate(rbandate[0],rbandate[1],rbandate[2]);
format(MyString,sizeof(MyString),"You Have Banned %s(%d)! (Reason %s)",tname, Target,Reason);
ShowPlayerDialog(playerid, 1000, DIALOG_STYLE_MSGBOX,"You Have Been Banned :(",TargetString, "OK", "");
SendClientMessageToAll(-1,MyString);
new AllString[256];
format(AllString,sizeof(AllString),"Admin %s has banned player %s(%d)! Reason(%s)", pname,tname,Target,Reason);
SendClientMessageToAll(-1,AllString);
new ip[50];
GetPlayerIp(Target,ip,sizeof(ip));
strdel(ip,strlen(ip)-4,strlen(ip));
format(ip,sizeof(ip),"%s**.**",ip);
format(ip,sizeof(ip),"banip %s",ip);
SendRconCommand(ip);
Ban(Target);
}
}
return 1;
}
dcmd_test(playerid, params[]) // UNBAN
{
if(PlayerInfo[playerid][pAdmin] >= 1339)
{
new ip[32], dformat[64];
if(sscanf(params,"s[32]",ip)) return SendClientMessage(playerid,-1,"/test [ip]");
format(dformat, sizeof(dformat),"unban %s",ip);
SendRconCommand(dformat);
}
return 1;
}
Re: Ban - Dont Work! -
Konstantinos - 09.11.2012
pawn Код:
dcmd_testban(playerid, params[]) // BAN
{
if(PlayerInfo[playerid][pAdmin] >= 1339)
{
new
Target,
Reason[100]
;
if(!sscanf(params, "us[100]", Target, Reason))
{
if(Target == playerid) return SendClientMessage(playerid, -1, "lol want to ban your self?");
new
tname[MAX_PLAYER_NAME],
pname[MAX_PLAYER_NAME],
MyString[128],
rbandate[3],
ip[50]
;
GetPlayerName(Target, tname, sizeof(tname));
GetPlayerName(playerid, pname, sizeof(pname));
getdate(rbandate[0], rbandate[1], rbandate[2]);
format(MyString, sizeof(MyString), "You Have Banned %s(%d)! (Reason %s)", tname, Target, Reason);
SendClientMessage(playerid, -1, MyString);
format(MyString, sizeof(MyString), "You Have Been Banned from Admin %s! (Reason %s)", pname, Reason);
ShowPlayerDialog(Target, 1000, DIALOG_STYLE_MSGBOX, "You Have Been Banned :(", MyString, "OK", "");
format(MyString, sizeof(MyString), "Admin %s has banned player %s(%d)! Reason(%s)", pname, tname, Target, Reason);
SendClientMessageToAll(-1, MyString);
GetPlayerIp(Target, ip, sizeof(ip));
strdel(ip, strlen(ip)-4, strlen(ip));
format(ip, sizeof(ip), "%s**.**", ip);
format(ip, sizeof(ip), "banip %s", ip);
SendRconCommand(ip);
Ban(Target);
return 1;
}
else return SendClientMessage(playerid, -1, "Syntax: /ban [ID/Part Of Name] [Reason]");
}
return 1;
}
dcmd_test(playerid, params[]) // UNBAN
{
if(PlayerInfo[playerid][pAdmin] >= 1339)
{
new
ip[32],
dformat[64]
;
if(sscanf(params, "s[32]", ip)) return SendClientMessage(playerid, -1, "/test [ip]");
format(dformat, sizeof(dformat),"unban %s",ip);
SendRconCommand(dformat);
}
return 1;
}