20.05.2011, 15:06
Hi im trying to make a include
but it dont get the right admin level, it sais "9" in phpMyAdmin but when i got in-game and test the function it sais "5"
so what are i doing wrong?
(im making a include so i can add it to filterscripts, like Lux Admin)
pawn Код:
#if defined _test_included
#endinput
#endif
#define _test_included
#include <mysql>
stock GetPlayerAdminLevel(playerid)
{
new string[1337], playername[MAX_PLAYER_NAME], PlayerAdminLevel[2];
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "SELECT * FROM `Users` WHERE `Name` ='%s'", playername);
mysql_query(string);
mysql_store_result();
if(mysql_num_rows())
{
mysql_fetch_field("AdminLevel", PlayerAdminLevel);
}
mysql_free_result();
return PlayerAdminLevel;
}
so what are i doing wrong?
(im making a include so i can add it to filterscripts, like Lux Admin)