13.12.2017, 18:56
Looking at the parameters of what crashdetect output shows the problem:
As you can see, the modelid is equal to 1 which is an invalid model ID - the valid IDs are between 400 and 611.
Wiki states that vehicle-creating functions will return INVALID_VEHICLE_ID (65535) if an invalid model is passed (or limit was reached).
So now we move to the previous place the iz_CreateVehicle function was called from.
and now let's check the wiki for R40+ version of mysql plugin: https://sampwiki.blast.hk/wiki/MySQL/R40...value_name_int
What happens here is that it does not return the result directly anymore but rather passes by reference (stores it in a variable). So basically, the function returned success (1) and this is what you used as modelid. Change to:
Код:
#0 004c1394 in public iz_CreateVehicle (modelid=1, Float:x=1.00000, Float:y=1.00000, Float:z=2.00000, Float:angle=1.00000, color1=1, color2=1, respawn_delay=300000)
Wiki states that vehicle-creating functions will return INVALID_VEHICLE_ID (65535) if an invalid model is passed (or limit was reached).
So now we move to the previous place the iz_CreateVehicle function was called from.
pawn Код:
vehicleid = iz_CreateVehicle( cache_get_value_name_int( i, "v_model", VehicleInfo[ i ][ vModel ] ),
cache_get_value_name_float( i, "v_pos_x", VehicleInfo[ i ][ vLokacijaX ] ),
cache_get_value_name_float( i, "v_pos_y", VehicleInfo[ i ][ vLokacijaY ] ),
cache_get_value_name_float( i, "v_pos_z", VehicleInfo[ i ][ vLokacijaZ ] )+1.0,
cache_get_value_name_float( i, "v_pos_a", VehicleInfo[ i ][ vLokacijaA ] ),
cache_get_value_name_int( i, "v_color_1", VehicleInfo[ i ][ vColor1 ] ),
cache_get_value_name_int( i, "v_color_2", VehicleInfo[ i ][ vColor2 ] ), 300000 );
Quote:
|
Return Values: 1 on success, 0 on failure. |
pawn Код:
cache_get_value_name_int( i, "v_model", VehicleInfo[ i ][ vModel ] );
cache_get_value_name_float( i, "v_pos_x", VehicleInfo[ i ][ vLokacijaX ] );
cache_get_value_name_float( i, "v_pos_y", VehicleInfo[ i ][ vLokacijaY ] );
cache_get_value_name_float( i, "v_pos_z", VehicleInfo[ i ][ vLokacijaZ ] );
cache_get_value_name_float( i, "v_pos_a", VehicleInfo[ i ][ vLokacijaA ] );
cache_get_value_name_int( i, "v_color_1", VehicleInfo[ i ][ vColor1 ] );
cache_get_value_name_int( i, "v_color_2", VehicleInfo[ i ][ vColor2 ] );
vehicleid = iz_CreateVehicle( VehicleInfo[ i ][ vModel ], VehicleInfo[ i ][ vLokacijaX ], VehicleInfo[ i ][ vLokacijaY ], VehicleInfo[ i ][ vLokacijaZ ]+1.0, VehicleInfo[ i ][ vLokacijaA ], VehicleInfo[ i ][ vColor1 ], VehicleInfo[ i ][ vColor2 ], 300000 );

