28.08.2012, 20:07
Quote:
Show us your code and I will fix it
This forum requires that you wait 120 seconds between posts. Please try again in 48 seconds. |
pawn Код:
// Callbacks
forward OnQueryFinish(resultid, extraid, handleid);
public OnQueryFinish(resultid, extraid, handleid)
{
new rows, fields;
if(resultid != SENDDATA_THREAD) {
if(extraid != INVALID_PLAYER_ID) {
if(g_arrQueryHandle{extraid} != -1 && g_arrQueryHandle{extraid} != handleid) return 0;
}
cache_get_data(rows, fields);
}
switch(resultid)
{
case LOADMOTDDATA_THREAD:
{
for(new i;i < rows;i++)
{
new szResult[32];
cache_get_field_content(i, "gMOTD", GlobalMOTD, MainPipeline);
cache_get_field_content(i, "aMOTD", AdminMOTD, MainPipeline);
cache_get_field_content(i, "vMOTD", VIPMOTD, MainPipeline);
cache_get_field_content(i, "cMOTD", CAMOTD, MainPipeline);
cache_get_field_content(i, "pMOTD", pMOTD, MainPipeline);
cache_get_field_content(i, "ShopTechPay", szResult, MainPipeline); ShopTechPay = floatstr(szResult);
break;
}
}
case LOADUSERDATA_THREAD:
{
if(IsPlayerConnected(extraid))
{
new szField[MAX_PLAYER_NAME], szResult[64];
for(new row;row < rows;row++)
{
cache_get_field_content(row, "Username", szField, MainPipeline);
if(strcmp(szField, GetPlayerNameExt(extraid), true) != 0)
{
return 1;
}
cache_get_field_content(row, "id", szResult, MainPipeline); PlayerInfo[extraid][pId] = strval(szResult);
cache_get_field_content(row, "Online", szResult, MainPipeline); PlayerInfo[extraid][pOnline] = strval(szResult);