Help...
#1

Hi guys i make a V.I.P system with 3 levels...and i have a problem on SQL reading...

Let's start...
if i set me a level with /setvip [playerid] [level] it works any command and everythink is write in database(vip level, name)...and commands for VIPs works..BUT...
when i connect second time when i write any command it says me i don't have V.I.P level 1 and in database says me i have VIP level 3 why?...i try to put this on OnPlayerConnect...i'm not sure if it is very correct here it is:
pawn Код:
public OnPlayerConnect( playerid )
{
    new Query[ 256 ];
   
    for ( new i = 0; i < P_DATA[ i ][ Vip ]; i++ )
    {
        format( Query, sizeof( Query ), "SELECT * FROM `Vips` WHERE `Name` = '%s' ", PlayerName2( playerid ) );
        P_DATA[ i ][ Vip ]++;
        db_free_result( db_query( Database, Query ) );
    }
    return 1;
}
so...how i can make this?
Reply
#2

sorry for duble post i forgot to use db_get_field_assoc...lol...i resolved!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)