28.07.2018, 18:18
Code:
Quote:
COMMANDanoff(playerid, params[]){ new name[MAX_PLAYER_NAME],tmpcarcel,minutes; if(!(date[playerid][pAdmin] == 5 || IsPlayerAdmin(playerid))) return 0; if(sscanf(params, "u",name,minutes)) return SendClientMessage(playerid,-1,"/sanoff [Name] [Mins]"); new string[128]; format(string,sizeof(string),CuentasA,name); if(!fexist(string)) return SendClientMessage(playerid,-1,"Error."); new INI:File = INI_Open(string); tmpcarcel = minutes * 60; date[name][pSanTime] = gettime() + tmpcarcel; date[name][pSan] = 1; date[name][pTeam] = 0; INI_WriteInt(File,"San",1); INI_WriteInt(File,"SanTime",minutes*60); format(string,128,"[CMD|OFF-LINE] %s san %d min. adm: %s",name,minutes,Nombre(playerid)); Informar(string); INI_Close(File); return 1;} |