26.01.2013, 13:46
i get server unknown command in my /rangeban command...
but it send %s Has been range banned and also it doesn't save D:
but it send %s Has been range banned and also it doesn't save D:
PHP код:
CMD:rangeban(playerid,params[])
{
new TargetID;
new Reason[128];
new File:File;
new String[256];
if(PlayerInfo[playerid][Adminlevel] >= 3)
{
if(!sscanf(params,"rs[128]",TargetID,Reason))
{
File = fopen("UACNR/Bans/Range.txt", io_readwrite);
format(String,256,"%s{FFFFFF} has been range-banned ({FF0000}%s{FFFFFF}).",PlayerName(TargetID),Reason);
SendClientMessageToAll(Red,String);
Kick(TargetID);
format(String,256,"%s //(Name: %s)-(Reason: %s)/r/n",GetRangeIp(TargetID),PlayerName(TargetID),Reason);
fwrite(File,String);
fclose(File);
}
else return SendClientMessage(playerid,White,"USAGE: {FF0000}/rangeban [Target ID] [Reason]");
}
else return SendClientMessage(playerid,Red,"Server:- {FFFFFF}you can't excute this command.");
return 1;
}