23.10.2014, 09:40
To add to Thresholds answer.
Both "GetName" and "Path" function have an int as their parameters. You're passing an array. Also if with sscanf specifier "u" you will get a players ID(or INVALID_PLAYER_ID) NOT his name.
Changing "targetid" to a an int will solve your errors.
Both "GetName" and "Path" function have an int as their parameters. You're passing an array. Also if with sscanf specifier "u" you will get a players ID(or INVALID_PLAYER_ID) NOT his name.
pawn Код:
ACMD:unban(playerid, params[])
{
new targetid, str[128];
if(sscanf(params,"u",targetid)) return SCM(playerid,-1, "--- /unban {33CCFF}<ID/Name>{FFFFFF}---");
new INI:file = INI_Open(Path(targetid)); //Line 711
INI_SetTag(file, "Player's Data");
INI_WriteInt(file, "Banned", 0);
INI_Close(file);
format(str, sizeof(str), "You have unbanned %s", GetName(targetid)); //Line 715
SCM(playerid, -1, str);
return 1;
}