12.08.2015, 00:11
im trying to make that when i do /unbanname the "Banned" is set to 0 and player can join , here's the script
error: undefined symbol "File"
Код:
CMD:unbanname(playerid,params[])
{
if(!IsPlayerAnAdmin(playerid,6))return SendClientMessage(playerid,0xFF0000FF,"You're not allowed to use this command!");
new Name[20],string[128],string3[128];
if(sscanf(params,"s",Name))return SendClientMessage(playerid,COL_GREEN,"/unbanname [name]");
format(string,sizeof(string),"You have unbanned %s.",Name);
for(new i=0;i<GetMaxPlayers();i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerAnAdmin(i,1))
{
format(string3,sizeof(string3),"A: %s [LEVEL %i] used the UNBANNAME command.",PlayerName(playerid),GetPVarInt(playerid,"Admin"));
SendClientMessage(i,COLOR_ORANGE,string3);
}
}
}
SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
format(Name,sizeof(Name),"/Accounts/%s.txt",Name);
INI_WriteInt(File,"Banned",0);
return 1;
}


