SA-MP Forums Archive
Problems with DOF2_SetInt and DOF2_GetString - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problems with DOF2_SetInt and DOF2_GetString (/showthread.php?tid=652395)



Problems with DOF2_SetInt and DOF2_GetString - k2bi - 09.04.2018


I'm having trouble with the following, get the string "charge" that will be storing a certain amount that the player chooses and put in the DOF2_SetInt ex: DOF2_SetInt (file, "AdminC", PlayerAdmin [playerid] [pNivel] = if this position will be the number set by the 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);