No Error But When I Type /setadmin Thats Happen
Код:
[05:18:32] *** YSI Error: INI_Open could not find or create file
[05:18:34] *** YSI Error: INI_Open could not find or create file
[05:18:38] *** YSI Error: INI_Open could not find or create file
[05:18:41] *** YSI Error: INI_Open could not find or create file
Here Is My SetAdmin Cmd
pawn Код:
YCMD:setadmin(playerid, params[], help)
{
new level,id,n[MAX_PLAYER_NAME];
new string[50];
new on[MAX_PLAYER_NAME];
new file[32],pName[MAX_PLAYER_NAME];
new INI:ini = INI_Open(file);
GetPlayerName(id,n,MAX_PLAYER_NAME);
GetPlayerName(id,on,sizeof(on));
format(file,sizeof(file),"MAdmin/Players/%s.txt",n);
if(PInfo[playerid][Adminlevel] < 6) return SendClientMessage(playerid,ORANGE,"You're Not Rcon Admin!");
if(sscanf(params,"ud",id,level)) return SendClientMessage(playerid,RED,"USAGE:/SetLevel [Playerid] [Level]");
if(!IsPlayerConnected(id))return SendClientMessage(playerid,GREY,"You have entered an incorrect ID");
PInfo[id][Adminlevel] = level;
format(string,sizeof(string),"You have set %s's level to %d",on,level);
SendClientMessage(playerid,LIGHTBLUE,string);
format(string,sizeof(string),"Player %s Is Now Admin Level %d",on,level);
SendClientMessageToAll(GREEN,string);
GetPlayerName(playerid,pName, MAX_PLAYER_NAME);
format(file, sizeof file, "Players/%s.ini",pName);
INI_WriteInt(ini,"AdminLevel",PInfo[playerid][Adminlevel]);
return 1;
}