01.11.2015, 20:33
Quote:
I'm using this and result is:
pawn Код:
pawn Код:
YSI version 1.04.0000 |
PHP код:
CMD:ban(playerid,parmas[])
{
new tid,res[90],ppp[50], banstring[50];
if(sscanf(parmas,"us",tid,res) || isnull(parmas))return SendClientMessage(playerid,-1,"/ban [id] [reason]");
GetPlayerIp(tid,ppp,sizeof(ppp));
new INI:File = INI_Open(UserPath(tid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Banned",1);
INI_WriteString(File,"BanAdmin",GetPlayerNameEx(playerid));
INI_WriteString(File,"BanReason",res);
INI_WriteString(File,"IP",ppp);
INI_Close(File);
format(banstring, sizeof(banstring),"banip %s", ppp);
SendRconCommand(banstring);
SendRconCommand("reloadbans");
return 1;
}
Код:
Banned = 0 BanAdmin = BanReason = IP =