11.04.2015, 00:23
PHP код:
CMD:darfuncao(playerid, params[]) {
new admin, funcao[56], string[128], arquivo[128];
new sendername[MAX_PLAYER_NAME];
if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid, COLOR_GRAD2, "Comando restrito apenas pra administradores.");
if(sscanf(params, "us[56]", admin, funcao)) return SendClientMessage(playerid, COLOR_GRAD1, "USE: /criar_funcao [{E01B4C}id/nome{B4B5B7}] [{249E33}funзгo{B4B5B7}]");
format(string, sizeof(string), "O Admin Setou Sua %s Funзao Para [%s]", sendername, funcao);
SendClientMessage(admin, LIGHTBLUE, string);
format(pAdmin, sizeof(string), "Vocк promoveu %s а funзгo %s de administraзгo.", sendername, funcao);
SendClientMessage(playerid, LIGHTBLUE, string);
format(arquivo, sizeof(arquivo), "Contas/%s.ini", sendername));
DOF2_SetString(arquivo, "Funcao", funcao);
DOF2_SaveFile();
format(PlayerInfo[admin][Funcao], 60, "%s", DOF2_GetString(arquivo, "Funcao"));
return 1;
}