Quote:
Originally Posted by Feastahashi
pawn Код:
CMD:offlineban(playerid,params[]) { new string[124],string1[124],giveplayername[24]; if(PlayerInfo[playerid][pAdmin] >= 4) { if(sscanf(params, "s", giveplayername)) { SendClientMessage(playerid, COLOR_GREY, "USAGE: /offlineban [full name(case sensative)]"); return 1; } format(string,sizeof(string),"/Users/%s.ini",giveplayername); if(fexist(string)) { new INI:File; File = INI_Open(string); INI_SetTag(File,"data"); INI_WriteInt(File,"Banned",1); INI_Close(File); format(string1, sizeof(string1), "* You have sucessfully offline-banned %s from the server.", giveplayername); SendClientMessage(playerid,COLOR_YELLOW,string1); } else SendClientMessage(playerid, COLOR_GRAD2, "Invalid player name specified in the database !"); } else SendClientMessage(playerid, COLOR_GRAD2, NOTADMIN); return 1; }
|
Please describe to him what was wrong in the code then only he can understand and use in future