[MySQL] samp-server quits when you run query
#2

Have a look at my code:
pawn Code:
stock LoadVehicles( )
{
    new
        ID ,
        Modelid ,
        Float:Spawn_X ,
        Float:Spawn_Y ,
        Float:Spawn_Z ,
        Float:Angle ,
        Color1 ,
        Color2 ,
        Respawn_delay ,
        line[ 1024 ] ;
    mysql_query( "SELECT * FROM `vehicles`" );
    mysql_store_result( );
    while( mysql_fetch_row_format( line , "|" ) )
    {
        sscanf( line , "p|iiffffiii" , ID , Modelid , Spawn_X , Spawn_Y , Spawn_Z , Angle , Color1 , Color2 , Respawn_delay );
        CreateVehicle( Modelid , Spawn_X , Spawn_Y , Spawn_Z , Angle , Color1 , Color2 , Respawn_delay ) );
    }
    mysql_free_result( );
    return 1;
}
It needs some adjustments here and there for you. But that is up to you!
Reply


Messages In This Thread
[MySQL] samp-server quits when you run query - by dioguitosbr - 09.11.2009, 18:03
Re: [MySQL] samp-server quits when you run query - by Marcel - 09.11.2009, 18:55
Re: [MySQL] samp-server quits when you run query - by Streetplaya - 09.11.2009, 19:03

Forum Jump:


Users browsing this thread: 1 Guest(s)