PHP Code:
public QueryVip(iFailState, Handle:hQuery, szError[], iErrnum, cData[], iSize, Float:fQueueTime)
{
if( iFailState != TQUERY_SUCCESS )
{
return log_amx("[Kz-Arg] SQL: SQL Error #%d - %s", iErrnum, szError)
}
if( SQL_MoreResults(hQuery) )
{
new resultado[2][192]
new punktid
SQL_ReadResult(hQuery, 0, resultado[0], 191)
SQL_ReadResult(hQuery, 1, resultado[1], 191)
punktid = str_to_num(resultado[0])
if (punktid >= 50)
{
client_print(0, print_chat, "Punktide arv: %s!", resultado[0])
client_print(0, print_chat, "Sa ostsid 50 punkti eest endale VIPi!", resultado[0])
}
else
{
client_print(0, print_chat, "Sul ei ole piisavalt punkte (%s)!", resultado[0])
}
}
return PLUGIN_CONTINUE
}
QueryVip(iFailState, Handle:hQuery, szError[], iErrnum, cData[], iSize, Float:fQueueTime,
id)
If i put ID in there, i get ID=0 Which is not right. Now, resultado[1] is user's name...so is there any way i can get user id from user's name?