09.04.2018, 22:24
Bom estou com duvida em fazer o seguinte, pegar a string "cargo" que vai estar armazenando certa quantia que o player escolher e colocar na DOF2_SetInt ex: DOF2_SetInt(file, "AdminC", PlayerAdmin [playerid] [pNivel] = cargo(no caso esse cargo sera o numero setado pelo admin)
Quote:
if(IsPlayerConnected(playerid)){ if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "Vocк nгo pode acessar esse comando"); else if(IsPlayerAdmin(playerid)){ new id, uname[MAX_PLAYER_NAME], cargo[128], string[128], pname[MAX_PLAYER_NAME], string2[128]; if(sscanf(params, "us[128]", id, cargo)) return SendClientMessage (playerid, 0x00FF00AA, "Comando: /Setplayeradmin [ID] [CARGO]"); if(!IsPlayerConnected(id)) return SendClientMessage (playerid, 0xFF0000AA, "ID nгo conectado"); GetPlayerName(id, uname, sizeof(uname)); GetPlayerName(playerid, pname, sizeof(pname)); format(file, sizeof(file), Admin, uname); new str2[128], hour, minute, second; gettime(hour,minute,second); format(str2, sizeof(str2), "%d:%d:%d", hour, minute, second); DOF2_CreateFile(file); DOF2_SetString(file, "Cargo Staff", cargo); DOF2_SetString(file, "Promovido Por", pname); DOF2_SetString(file, "Hora", str2); |