Memory leak?
#3

Well, i know i have 3 arguments and then 1. That's what I ask: can be dangerous if I call a function with more parameters than the public?

Why? look:

PHP код:
SpawnCar(typeFloat:xFloat:yFloat:zFloat:ac1c2respawn=300addsiren=0

    new 
id CreateVehicle(typexyzac1c2respawnaddsiren);
    if(
id != INVALID_VEHICLE_ID)
        
CallLocalFunction("OnVehicleCreate""iiffffiiii"qtypexyzac1c2respawnaddsiren); 
    return 
id
}
// inside vehicle_data.inc
#include <YSI\y_hooks> 
hook OnVehicleCreate(vehicleid
{
    
Vehicle_Fuel[vehicleid] = 0;
    
Players_In_Vehicle[vehicleid] = 0;
    
// i don't need info about vehicle's spawn pos here, so there is just vehicleid as parameter. 
}  
// inside vehicle_mod_and_colors.inc
#include <YSI\y_hooks> 
hook OnVehicleCreate(vehicleidtypeFloat:xFloat:yFloat:zFloat:ac1c2
{
    
Vehicle_Color_1[vehicleid] = c1;
    
Vehicle_Color_2[vehicleid] = c2;
    
// here I need details about colors.

Reply


Messages In This Thread
Memory leak? - by GaByM - 17.02.2018, 10:05
Re: Memory leak? - by Mugala - 17.02.2018, 10:10
Re: Memory leak? - by GaByM - 17.02.2018, 11:37
Re: Memory leak? - by OneDay - 17.02.2018, 11:49
Re: Memory leak? - by Dayrion - 17.02.2018, 14:53

Forum Jump:


Users browsing this thread: 1 Guest(s)