Question: Make into Code for all of callbacks
#1

I want to in some way make the outcome of h usable in my entire GM, but how can I do this?

Thanks in advance: jakejohnsonusa

Under OnGameModeInt (what I want h to be usable for in the ENTIRE GM(All Callbacks):
pawn Код:
new string2[64];
    for(new h = 1; h < sizeof(CarInfo); h++)
    {
        format(string2, sizeof(string2), "LARP/Vehicles/%d.ini",h);
        if(dini_Exists(string2))
        {
Basically how can I add this code to the very beggining of My GM with " new LoadedCarID = h; " ?
Reply
#2

I think you can do this:
pawn Код:
new LoadedCarID = 1;
public OnGameModeInit()
{
    new string2[64];
    for(LoadedCarID < sizeof CarInfo; LoadedCarID ++)
    {
        format(string2, 64, "LARP/Vehicles/%d.ini", LoadedCarID);
        // Other Code
    }
    // Other Code
    return 1;
}
And then use it in your all gamemode...
Reply
#3

The problem is, is that I need this for things above OnGameModeInt, meaning I need to add it bellow all the new's in the beggining of my script. Anyone else know?

It'll be so I can use the variable h all through my GM.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)