SA-MP Forums Archive
Array help :3 - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Array help :3 (/showthread.php?tid=329999)



Array help :3 - 2KY - 31.03.2012

I'm new at creating arrays, and I'm trying to create a valid skin array, and integrate it into my mode. I'm using Y_Classes, and I'm running into a problem with the array (I'm assuming, it very well could be me misusing y_classes)

pawn Code:
new
    ValidModels [ ] [ 1 ] = {
        { 1 }
    };
pawn Code:
public OnGameModeInit()
{
    for( new model; model < sizeof( ValidModels ); model ++ )
    {
        ValidModels [ model ] [ 0 ] = Class_Add( model, 255.0, 0.0, 10.0, 0.0 );
    }
    return 1;
}

public OnGameModeExit()
{
    for( new model; model < sizeof( ValidModels ); model ++ )
    {
        Class_Delete( ValidModels [ model ] [ 0 ] );
    }
    return 1;
}



Re: Array help :3 - MP2 - 31.03.2012

I don't think you need to delete them under OnGameModeExit..