01.02.2014, 11:06
Well, maybe but you'd have to use CallRemoteFunction, SQL, player Teams (GetPlayerTeam), or PVars
CallRemoteFunction calls a function from other loaded script and returns the value it returns.
You could do
In the main gamemode then in the filterscript
Which would also be unaccurate under heavy script processing load.
--------
With Teams you face the anti team kill problems but if that's okay for you then that would be the easiest solution.
---------
With SQL it would be pretty easy, connecting both scripts to the same DB.
---------
Alternatively and the easiest way I remembered while writting this is PVars.
PVars are shared between gamemodes and filterscripts loaded.
If you load a player's faction in the main gamemode, by saving it with PVars you can access that very same PVar in any filterscript you load.
CallRemoteFunction calls a function from other loaded script and returns the value it returns.
You could do
pawn Код:
forward GetCopLevel(playerid);
public GetCopLevel(playerid)
{
return GetPVarInt(playerid,"CopLevel"); // or whatever you use to store levels.
}
pawn Код:
new coplevel = CallRemoteFunction("GetCopLevel", "i", playerid);
--------
With Teams you face the anti team kill problems but if that's okay for you then that would be the easiest solution.
---------
With SQL it would be pretty easy, connecting both scripts to the same DB.
---------
Alternatively and the easiest way I remembered while writting this is PVars.
PVars are shared between gamemodes and filterscripts loaded.
If you load a player's faction in the main gamemode, by saving it with PVars you can access that very same PVar in any filterscript you load.