unban ? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: unban ? (
/showthread.php?tid=418070)
unban ? -
MiGu3X - 23.02.2013
hello everyone, so im doing an unban command... this is my code..
pawn Код:
CMD:unban(playerid, params[])
{
new pName[MAX_PLAYER_NAME];
new str[128];
if(sscanf(params, "s[MAX_PLAYER_NAME]", pName)) return SendClientMessage(playerid, DEEPPINK, "USAGE: /unban <name>");
if (PlayerInfo[playerid][pAdmin] >=3)
{
if(!fexist(UserPath(pName))) return SendClientMessage(playerid, DEEPPINK, "ERROR: Player doesn't exist.");
new INI:File = INI_Open(UserPath(playerid));
INI_WriteInt(File,"Banned", 0);
INI_Close(File);
format(str, sizeof(str), "You have unbanned %s.", pName);
SendClientMessage(playerid, RED, str);
}
else SendClientMessage(playerid, DEEPPINK, "ERROR: You must be level 3 to use that command!");
return 1;
}
the error line is:
Код:
if(!fexist(UserPath(pName))) return SendClientMessage(playerid, DEEPPINK, "ERROR: Player doesn't exist.");
and the error i get is:
Код:
C:\Users\user7\Desktop\Server\gamemodes\new.pwn(1142) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Could someone help me please?
Regards, Migue
P.S: Im using y_ini register / login system ..
Respuesta: unban ? -
MiGu3X - 24.02.2013
Bump? ...