Use a Filterscripts Class Selection Instead of Gamemode Class Selection
#1

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.
Reply
#2

what about trying it out?
Reply
#3

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

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
Reply
#5

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
Reply
#6

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

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;

}
Reply
#8

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"
Reply
#9

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
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)