SA-MP Forums Archive
server close when add filterscript to server.cfg - 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: server close when add filterscript to server.cfg (/showthread.php?tid=569964)



server close when add filterscript to server.cfg - 5002 - 04.04.2015

hi i make an FS and add it to my server.cfg

but after click on samp-server it show and close fast

i think my FS Have problem but i dont know what is that prob

its my FS


AW: server close when add filterscript to server.cfg - Mencent - 04.04.2015

Hello!

Can you show us your Server-Log please?


Re: server close when add filterscript to server.cfg - Karan007 - 04.04.2015

Show us your server.cfg once.


Re: server close when add filterscript to server.cfg - 5002 - 04.04.2015

Код:
SA-MP Dedicated Server
----------------------
v0.3z, ©2005-2014 SA-MP Team

[01:17:47] 
[01:17:47] Server Plugins
[01:17:47] --------------
[01:17:47]  Loaded 0 plugins.

[01:17:47] 
[01:17:47] Filterscripts
[01:17:47] ---------------
[01:17:47]   Loading filterscript 'adm.amx'...
[01:17:47] 
--------------------------------------
[01:17:47]  ADMIN MENU
[01:17:47] --------------------------------------

[01:17:47]   Loaded 1 filterscripts.
and its my server.cfg
Код:
echo Executing Server Config...
lanmode 0
rcon_password 123456789
maxplayers 50
port 7777
hostname House Role Play
gamemode0 rol
filterscripts adm
announce 0
query 1
chatlogging 0
weburl www.sa-mp.com
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
maxnpc 0
logtimeformat [%H:%M:%S]



AW: server close when add filterscript to server.cfg - Mencent - 04.04.2015

Try it:
Delete your OnGameModeInit in your filterscript and write your OnFilterScriptInit so:
PHP код:
public OnFilterScriptInit()
{
    print(
"\n--------------------------------------");
    print(
" ADMIN MENU");
    print(
"--------------------------------------\n");
    
CreateMenu("Admincp",1,20,120,150,40);
    
AddMenuItem(Admincp,0,"vehicles");
    
AddMenuItem(Admincp,0,"tp");
    
AddMenuItem(Admincp,0,"skins");
    
CreateMenu("Vehicles",1,20,120,150,40);
    
AddMenuItem(Vehicles,0,"NRG");
    
AddMenuItem(Vehicles,0,"jetpack");
    
AddMenuItem(Vehicles,0,"hydra");
    
AddMenuItem(Vehicles,0,"hunter");
    
CreateMenu("Teleport",1,20,120,150,40);
    
AddMenuItem(Teleport,0,"LSPD");
    
AddMenuItem(Teleport,0,"LSCH");
    
CreateMenu("Skin",1,20,120,150,40);
    
AddMenuItem(Skin,0,"LSPD");
    
AddMenuItem(Skin,0,"ARMY");
    
AddMenuItem(Skin,0,"SWAT");
    return 
1;

If it works that way?


Re: server close when add filterscript to server.cfg - Karan007 - 04.04.2015

Код:
echo Executing Server Config...
lanmode 0
rcon_password 123456789
maxplayers 50
port 7777
hostname House Role Play
gamemode0 rol 1
filterscripts adm
announce 0
query 1
chatlogging 0
weburl www.sa-mp.com
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
maxnpc 0
logtimeformat [%H:%M:%S]
Replace yours with mine in server.cfg.
When you add your gamemode in the server.cfg it must be like this
Код:
gamemode0 rol 1
You must add the 1 after the gamemode name!


Re: server close when add filterscript to server.cfg - 5002 - 04.04.2015

if its your mine no


AW: server close when add filterscript to server.cfg - Mencent - 04.04.2015

Quote:
Originally Posted by karan007
Посмотреть сообщение
[code]
You must add the 1 after the gamemode name!
That's wrong! I can start my server without the 1 after my gamemode name.


Re: server close when add filterscript to server.cfg - 5002 - 04.04.2015

Quote:
Originally Posted by karan007
Посмотреть сообщение
Код:
echo Executing Server Config...
lanmode 0
rcon_password 123456789
maxplayers 50
port 7777
hostname House Role Play
gamemode0 rol 1
filterscripts adm
announce 0
query 1
chatlogging 0
weburl www.sa-mp.com
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
maxnpc 0
logtimeformat [%H:%M:%S]
Replace yours with mine in server.cfg.
When you add your gamemode in the server.cfg it must be like this
Код:
gamemode0 rol 1
You must add the 1 after the gamemode name!
not work
server work good before add fs


AW: server close when add filterscript to server.cfg - Mencent - 04.04.2015

I don't know wheather it works but take the crashdetect Plugin. Maybe it shows where the filterscript stops.