Return query on the same function
#1

I wanna do something like this

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);
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
Reply


Messages In This Thread
Return query on the same function - by BillieJoe - 02.02.2015, 22:04
Re: Return query on the same function - by denNorske - 02.02.2015, 22:24
Re: Return query on the same function - by BillieJoe - 02.02.2015, 22:34
Re: Return query on the same function - by BillieJoe - 02.02.2015, 22:41
Re: Return query on the same function - by Sime30 - 02.02.2015, 22:42
Re: Return query on the same function - by denNorske - 03.02.2015, 00:25
Re: Return query on the same function - by Abagail - 03.02.2015, 00:35

Forum Jump:


Users browsing this thread: 1 Guest(s)