SA-MP Forums Archive
Filterscript into 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: Filterscript into Gamemode (/showthread.php?tid=418464)



Filterscript into Gamemode - xX4m4zingXx - 24.02.2013

can i place filterscript into a gamemode.
i want to make a rp gamemode and i found a filterscript that has a speedometer.
but i don't want to use filterscripts i just want to replace the speedometer in the gamemode with that filterscript.
is that possible and if it's possible
how then?


Re: Filterscript into Gamemode - Misiur - 24.02.2013

Of course it is possible, because both are written in pwn. If you have .pwn of the filterscript it shouldn't be hard to spot the similarities


Re: Filterscript into Gamemode - Lemonaidz - 25.02.2013

Yes, very easy, Just open up the .pwn file of the speedometer with pawno.exe and copy and paste the script.
Example, i open up my Filterscript and it has this:
Quote:

TextDrawsShown[playerid] = false;
VHSCreated[playerid] = false;
LightRedHealthCreated[playerid] = false;
LightYellowSpeedCreated[playerid] = false;
}

And the Function is this:
Quote:

public OnPlayerConnect(playerid)
{

i Would go into my Gamemode file and Find the function:
Quote:

public OnPlayerConnect(playerid)
{

and paste the code:
Quote:

TextDrawsShown[playerid] = false;
VHSCreated[playerid] = false;
LightRedHealthCreated[playerid] = false;
LightYellowSpeedCreated[playerid] = false;
}

Do this for all the script, make sure the script is under its right function
Hope this helped its a bit confusing :P


Re: Filterscript into Gamemode - xX4m4zingXx - 29.03.2013

sorry for the late reply
thank you very much now i know how to do it Thanks

Greet xX4m4zingXx

(this topic can be locked)