22.07.2014, 21:02
Hello. When I'm using the command on unknown player from the files it says invalid playername. however when im using the command on the actual real name which exists the server gives error. unknown command.
here is the crash output code:
here is the command:
[NOTE]: In linux system this code crashes the server..
What is wrong? Anybody can tell me please?
here is the crash output code:
pawn Код:
[debug] Run time error 6: "Invalid instruction"
[debug] Unknown opcode 0x8209 at address 0x0000006F
[debug] AMX backtrace:
[debug] #0 0000006f in public cmd_unban () from LG-RP.amx
[debug] #1 native CallLocalFunction () [00472e50] from samp-server.exe
[debug] #2 0000646c in public OnPlayerCommandText (0x00000000, 0x0227979c) from LG-RP.amx
pawn Код:
CMD:unban(playerid, params[])
{
new playerb, string[128];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pAdmin] < 4) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
if(sscanf(params, "s[32]", playerb)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /unban [name]");
if(!fexist(UserDB(playerb))) return SendClientMessage(playerid, COLOR_GREY, "Invalid player name.");
new INI:File = INI_Open(UserDB(playerb));
INI_SetTag(File,"PlayerData");
INI_WriteString(File, "BanReason", "None");
INI_WriteString(File, "BannedBy", "None");
INI_WriteInt(File, "Banned", 0);
INI_Close(File);
format(string, sizeof(string), "AdmWarn: %s has unbanned %s.", RPN(playerid), params);
SendAdminMessage(COLOR_DARKRED, 1, string);
format(string, sizeof(string), "AdmWarn: %s (%s) has unbanned %s (%s).", RPN(playerid), RPIP(playerid), params);
return 1;
}
What is wrong? Anybody can tell me please?


