Loading a help list
#1

Hello.
i have a command where someone can use /help to ask a question, it stores it in the database, and i want a list with unanswered questions.
I made a code, but it doesn't load anything.
Can someone tell me what i did wrong?
Thanks.

PHP код:
COMMAND:helplist(playeridparams[])
{
    new 
query[420];
    if(!
Player[playerid][Admin] && !Player[playerid][Helper]) return SendClientError(playerid,"You are not authorized to use this command");
    for(new 
i=1i<100i++)
    {
    
format(query,sizeof(query),"SELECT * FROM helplist WHERE ID='%s' AND active='1'",i);
    
mysql_tquery(connection,query,"helpList","ud",playerid,i);
    }
    return 
1;
}
forward helpList(playerid,helpid);
public 
helpList(playerid,helpid)
{
    new 
string[420],temp_sentby[35],temp_wat[420];
    
cache_get_field_content(helpid"sentby"temp_sentby);
    
cache_get_field_content(helpid"wat"temp_wat);
    
    
format(string,sizeof(string),"{FFFFFF}[{6f757d}Help ID%d{FFFFFF}] {6f757d}%s{FFFFFF}: '{6f757d}%s{FFFFFF}'",helpid,temp_sentby,temp_wat);
    
SendClientMessage(playerid,-1,string);
    return 
1;

Reply


Messages In This Thread
Loading a help list - by justjamie - 27.06.2016, 17:07
Re: Loading a help list - by Stinged - 27.06.2016, 17:40
Re: Loading a help list - by justjamie - 27.06.2016, 18:33
Re: Loading a help list - by Stinged - 27.06.2016, 18:43
Re: Loading a help list - by justjamie - 27.06.2016, 18:52
Re: Loading a help list - by Stinged - 27.06.2016, 18:57
Re: Loading a help list - by justjamie - 27.06.2016, 19:14
Re: Loading a help list - by Logic_ - 27.06.2016, 20:01

Forum Jump:


Users browsing this thread: 1 Guest(s)