about LoadFilterscript()
#1

What is different about
Код:
LoadFilterscript()
and
Код:
OnFilterScriptInit
i want to move all filterscript to gamemodes so it optimized
where should i put this lines at?
Код:
public LoadFilterscript()
{
    LoadDealerships();
	LoadDealershipCars();
	
	for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { LoadPlayerVehicleData(i); } }
	return 1;
}
Reply
#2

firstly, LoadFilterscript is when a filterscript is loaded (scripted in a gamemode), but OnFilterScriptInit is used the filterscript is loaded (scripted in a filterscript), But I recommend to use OnFilterScriptInit (on a filterscript).

secondly, do you mean under OnGameModeInit? If so, then here:

pawn Код:
public OnGameModeInit()
{
        LoadDealerships();
    LoadDealershipCars();
   
    for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { LoadPlayerVehicleData(i); } }
    return 1;
}
Reply
#3

There is no LoadFilterscript() native in SA-MP, to load a filterscript from the gamemode you have to use SendRconCommand("loadfs (name of fs)"). Also, OnFilterScriptInit has nothing to do with the gamemode.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)