Question
#3

Where should i put that? Because on player connect i already have command

public OnPlayerConnect( playerid )
{
new
Query[ 256 ],
string[ 128 ],
DBResult:Result,
Field[ 30 ]
;

format( Query, sizeof( Query ), "SELECT * FROM `Vips` WHERE `Nume` = '%s'", PlayerName( playerid ) );
Result = db_query( Database, Query );

if ( Result )
{
if ( db_num_rows( Result ) )
{
db_get_field_assoc( Result, "VipLevel", Field, 4 ); P_DATA[ playerid ][ Vip ] = strval( Field );
db_get_field_assoc( Result, "VSkin", Field, 4 ); P_DATA[ playerid ][ p_FavSkin ] = strval( Field );

#if defined SHOW_LEVEL_DIALOG
format( string, sizeof( string ), "\t{FF5500}Tvoj VIP Level :\n\n{FF5500}Postali ste VIP level {00FF00}%d\n\n{E60000}Cestitamo!", P_DATA[ playerid ][ Vip ] );
ShowPlayerDialog( playerid, ONCONN, DIALOG_STYLE_MSGBOX, "{00FF00}V.I.P", string, "Quit", "" );
#endif
}
else
{
P_DATA[ playerid ][ Vip ] = 0;
P_DATA[ playerid ][ p_FavSkin ] = -1;

format( Query, sizeof Query, "INSERT INTO `Vips` VALUES(NULL,'%s','0','-1')", PlayerName( playerid ) );
db_query( Database, Query );

#if defined SHOW_LEVEL_DIALOG
ShowPlayerDialog( playerid, ONCONN+1, DIALOG_STYLE_MSGBOX, "{00FF00}V.I.P", "{E60000}Ovaj korisnik ima VIP Level 0", "Quit", "" );
#endif
}
db_free_result( Result );
}
return 1;
}

So..
Reply


Messages In This Thread
Question - by DeitY - 30.08.2012, 18:52
Re: Question - by ThePrograme - 30.08.2012, 19:09
Re: Question - by DeitY - 30.08.2012, 19:11
Re: Question - by ThePrograme - 30.08.2012, 19:19
Re: Question - by DeitY - 30.08.2012, 19:26
Re: Question - by ThePrograme - 30.08.2012, 19:29
Re: Question - by ThePrograme - 30.08.2012, 19:32
Re: Question - by DeitY - 30.08.2012, 19:44
Re: Question - by ThePrograme - 30.08.2012, 19:54
Re: Question - by DeitY - 30.08.2012, 20:07

Forum Jump:


Users browsing this thread: 1 Guest(s)