29.05.2013, 15:45
Hi there. I am having a bit trouble with making ban cmd for offline players with y_ini. I am getting these errors. Please help.
Код:
F:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\zma.pwn(2552) : error 035: argument type mismatch (argument 1) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
Код:
CMD:banofflineplayer(playerid, params[]) { new targetname[24], filestring[79]; if(sscanf(params, "s[24]", targetname)) return SendClientMessage(playerid, -1, "Correct Usage: /banofflineplayer [Player's Name]"); format(filestring, sizeof(filestring), "/ZMA/Users/%s.ini", targetname); if(!fexist(filestring)) return SendClientMessage(playerid, -1, "Error: The player name you have chosen was not found in our system."); else { new INI:File = INI_Open(UserPath(filestring)); INI_SetTag(File, "data"); INI_WriteInt(File, "pNameBanned", 1); INI_Close(File); new done[128]; format(done, sizeof(done), "You have banned %s", targetname); SendClientMessage(playerid,-1 , done); } return 1; }
Код:
stock UserPath(playerid) { new str[128],name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name)); format(str,sizeof(str),PATH,name); return str; }