02.02.2015, 22:04
I wanna do something like this
But after mysql_tquery it doesn't store the value and cmdlevel var is not working... I don't know how to do this on the same function. I don't want to create another function for this. Rep + for helping me to solve my problem
pawn Код:
CMD:kick(playerid, params[])
{
new command[8] = "cmdkick";
new cmdlevel;
mysql_format(Mysql_users, query, sizeof(query), "SELECT * FROM `commands` WHERE `command` = '%s'", command);
mysql_tquery(Mysql_users, query, "", "");
printf("%s", query);
cmdlevel = cache_get_field_content_int(0, "adminlevel", Mysql_users);
printf("%s", cmdlevel);
if(PlayerData[playerid][AdminLevel] < cmdlevel) return SendUnathorizedMessage(playerid);