Question
#1

How I can add a filterscript into the gamemode script, not the filterscript folder?
Reply
#2

Do you want to say how to transform a filterscript into a gamemode ? Or how to make one script from the filterscript and gamemode.
If you want to make a gamemode from a filterscript you must replace:

"OnFilterScriptInit" with "OnGameModeInit"
"OnFilterScriptExit" with "OnGameModeExit"

to delete #if defined FILTERSCRIPT or #FILTERSCRIPT etc, after that you must move the filterscript that will be now a gamemode into the gamemodes folder, also don't forget about main(){}, you must put this at the top of the gamemode or above "OnGameModeInit" public.

DON'T FORGET TO RECOMPILE THE SCRIPT, if you want the changes that you made to be saved. :]]
Reply
#3

I mean i don't know how to insert the filterscript into the gamemode
Reply
#4

1. You place the filterscript to "Filterscripts" -folder. Open server.cfg, and add the name of the filterscript to the line which starts with "filterscripts". Hope I helped!
Reply
#5

Quote:
Originally Posted by HNIC
Посмотреть сообщение
1. You place the filterscript to "Filterscripts" -folder. Open server.cfg, and add the name of the filterscript to the line which starts with "filterscripts". Hope I helped!
i said not this way
i don't want to put the filterscript

i want the code from the filterscript inserted to my gamemode..
Reply
#6

Quote:
Originally Posted by enzulikeS
Посмотреть сообщение
i said not this way
i don't want to put the filterscript

i want the code from the filterscript inserted to my gamemode..
Oh. In that case, open the filterscript in Pawno. copy the variables to the gamemode script. (Doublecheck that there isnґt any conflicts)

Next, lets say for example that this is your filterscript:

Код:
public OnPlayerConnect(playerid)
{
    new string[64], pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    format(string,sizeof string,"%s has joined the server. Welcome!",pName);
    SendClientMessageToAll(0xFFFFFFAA,string);
    return 1;
}
Find OnPlayerConnect -callback from your gamemode, then copy everything that is inside the filterscripts callback (I painted it red in my example) under the gamemodesґ OnPlayerConnect -callback.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)