16.06.2012, 02:18
Hi friends,i noticed something that very weird. After player disconnects game,a function saves his datas.One row is like this:
And the function is this:
But,what is that?Query goes like this:
Note: PlayerInfo[playerid][Level] is 5
pawn Код:
SetMemberInfoInt(username,"adminlevel",PlayerInfo[playerid][Level]);
pawn Код:
FUNCTION SetMemberInfoInt(username[], statname[], value)
{
new query[128];
format(query,128,"UPDATE members SET %s='%i' WHERE member_name='%s'",statname,value,username);
mysql_query(query);
return 1;
}
But,what is that?Query goes like this:
pawn Код:
UPDATE members SET adminlevel='0' WHERE member_name='Snakeman'