SA-MP Forums Archive
Use a Filterscripts Class Selection Instead of Gamemode Class Selection - 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: Use a Filterscripts Class Selection Instead of Gamemode Class Selection (/showthread.php?tid=365691)



Use a Filterscripts Class Selection Instead of Gamemode Class Selection - Eminem 2ka9 - 03.08.2012

I have a game mode, it already has class selection but I don't like it. The filterscript I have actually has a decent class selection with categories, but I'm not fully sure How to actually switch from gamemode class selection to my Filterscripts class selection. Would removing class selection from my gamemode do this automatically? I don't know!

Thanks a lot.


Re: Use a Filterscripts Class Selection Instead of Gamemode Class Selection - Sascha - 03.08.2012

what about trying it out?


Re: Use a Filterscripts Class Selection Instead of Gamemode Class Selection - Eminem 2ka9 - 03.08.2012

Hm I'm not fully sure what to remove, I could corrupt my Gamemode.


Re: Use a Filterscripts Class Selection Instead of Gamemode Class Selection - Sascha - 03.08.2012

There are those "cool" comment "features"....
at your "OnPlayerRequestClass" callback, simply comment everything out... like this:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    /*
        SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
*/

    return 1;
}
the /* is the start symbol. Write it before the part you want to "comment out"... the */ defines the end of the comment....
this way you don't have to delete anything and can simply restore it later, and the script simply ignores it


Re: Use a Filterscripts Class Selection Instead of Gamemode Class Selection - Eminem 2ka9 - 03.08.2012

It doesn't seem to be working. When I start up the server and when the screen comes to class selection, It doesn't show any character just the camera is still pointing in the direction just no characters. And I can cycle through the classes and end up with a random one


Re: Use a Filterscripts Class Selection Instead of Gamemode Class Selection - Sascha - 03.08.2012

then simply try to copy the OnPlayerRequestClass part into your gamemode
atleast basic parts like "SetPlayerPos", "SetPlayerFacingAngle", "SetPlayerCameraPos", "SetPlayerCameraLookAt", whatever


Re: Use a Filterscripts Class Selection Instead of Gamemode Class Selection - Eminem 2ka9 - 03.08.2012

Will I remove them from gamemode and put them into my filterscript?
It already has its own!

//======================CLASSES FUNCTIONS=====================//
new gPlayerClass[MAX_PLAYERS];

public OnPlayerRequestClass(playerid, classid)

{

gPlayerClass[playerid] = ASSAULT_CLASS;

return 1;

}


Re: Use a Filterscripts Class Selection Instead of Gamemode Class Selection - Sascha - 03.08.2012

the other way 'round
copy them from your filterscript and paste them into your gamemode.
For safety you should firstly copy it underneath the out commented part, so you still have the old "backup"


Respuesta: Use a Filterscripts Class Selection Instead of Gamemode Class Selection - HarlemSAMP - 03.08.2012

Eminem, i suggest you to backup your script, just make a copy of it with a different name, then just mess around with it, that helped me alot when i was new to scripting


Re: Use a Filterscripts Class Selection Instead of Gamemode Class Selection - Eminem 2ka9 - 03.08.2012

Oh ok I getcha, thanks I'm new to scripting I'll try that thanks.