#1

Hi, in mode I did CMD: unban via INI and I have ERROR with organizations which I can not help how I fixed it?
Код:
CMD:unban(playerid, params[]) {
if (PlayerInfo[playerid][pAdmin] >= 3) {
new PlayerFile[50],String[128];
if(sscanf(params, "u[50]",PlayerFile)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /unban <account>");
format(PlayerFile, sizeof(PlayerFile), PATH, params);
if (!INI_Exists(PlayerFile)) return SendClientMessage(playerid, COLOR_RED, "ERROR: Player is not registered.");
if (INI_WriteInt(PlayerFile, "Banned") == 0) return SendClientMessage(playerid, COLOR_RED, "ERROR: Account is not marked as banned, unable to proceed with unbanning.");
INI_WriteInt(PlayerFile, "Banned", 0);
format(String, sizeof(String), "AdminCmd:If You Know '%s' Tell Him That He/She Has been unbanned By An Admin..", params);
SendClientMessage(playerid, COLOR_GREEN, String);
format(String, sizeof(String), "Admin %s, (ID:%d) has unbanned Account: %s", params);
SendClientMessageToAdmins(String);
}else {
return 0;
}
return 1;
}
Reply
#2

HElp me Please
Reply
#3

Huh ? Can you explain a little more what you mean, cant understand what you are trying to say.
Reply
#4

I had unban command which was Dini and I gave it to INI and now it shows me Error and I can not fix it
Reply
#5

First of all you've forgot to open the file and you use INI_WriteInt to return a value instead of INI_Int

See this please.
https://sampforum.blast.hk/showthread.php?tid=175565
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)