SA-MP Forums Archive
function or dini i need ??? - 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: function or dini i need ??? (/showthread.php?tid=506513)



function or dini i need ??? - lonalovegood1 - 13.04.2014

Hello There
Im Making a Game Mode and i want to add titles in the place of Admins ...
Like Citizen , Mayor and etc.
I am using dini user system and i need help
ive compiled my gm with this big problem
when i set the title , maybe for myself :
Код:
        new tItle[128]="[Citizen]";
CMD:settitle(playerid,params[])
{
	new ttl;
	new lvl;
	new Player[64];
	new name[MAX_PLAYER_NAME];
	sscanf(params,"d",ttl);
	GetPlayerName(playerid,name,sizeof(name));
	format(Player,sizeof(Player),"/Accounts/%s.txt",name);
	dini_IntSet(Player,"level",ttl);
	lvl = dini_Int(Player,"level");
		if (level==0){ tItle="{FFFFFF}[{FFFFFF}Citizen{FFFFFF}]"; return 1;}
		else if (level==1){ tItle="{FFFFFF}[{00FF00}Engeneer{FFFFFF}]"; return 1;}
		else if (level==2){ tItle="{FFFFFF}[{0000FF}Mayor{FFFFFF}]"; return 1;}
		else if (level==3){ tItle="{FFFFFF}[{FFFF00}President{FFFFFF}]"; return 1;}
		else if (level==5){ tItle="{FFFFFF}[{FF0000}RCON{FFFFFF}]"; return 1;}
	return 1;
}
when i set my self a level , all players level will change !!!!!!
i want to define a (playerid) that can help me decide for each player to be admin or not with dini and zcmd
please help me !!!
i know someone defines stock but i can not do that
help me please !