SA-MP Forums Archive
Linking filterscript to gamemode? - 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: Linking filterscript to gamemode? (/showthread.php?tid=418903)



Linking filterscript to gamemode? - Da_Noob - 26.02.2013

Is it possible to link a variable made in your filterscript to a gamemode?

I have an enum defined in my gamemode, like most people:

pawn Код:
enum pInfo
{
// blablablabl
};
new PlayerInfo[MAX_PLAYERS][pInfo];
So then I can do like:

pawn Код:
PlayerInfo[playerid][pDeaths]++;
But we all know if I do this in my filterscript it will give me an error.
So what if I make a new enum in my filterscript, the same as in my gamemode. Then I do in my filterscript

pawn Код:
PlayerInfo[playerid][pDeaths]++;
And when the player disconnects it saves his pDeaths in the gamemode, but will it also add the pDeaths that are added in the filterscript or not?

Thanks.


Re: Linking filterscript to gamemode? - LarzI - 26.02.2013

Why don't you test it?