Auto Change Gamemode
#1

plz Can anybody help me with something like

"After 6 Min" my game will restart and will change gamemode exmp: grandlarc to lvdm
Reply
#2

One gamemode does not simply change can if you are trying host a server may we please see your server log and server configuration settings. If this is not the case please care to give more details to what's going on.
Reply
#3

am new plz u make and teach me
Reply
#4


Im trying to make it as simple as possible open those 2 files that the arrows are pointing to and copy the contents from them and post it here.
Reply
#5

echo Executing Server Config...
lanmode 0
rcon_password changeme
maxplayers 50
port 7777
hostname SA-MP 0.3 Server
gamemode0 grandlarc 1
filterscripts gl_actions gl_realtime gl_property gl_mapicon ls_elevator attachments skinchanger vspawner ls_mall ls_beachside
announce 0
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]
language English
Reply
#6

----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3.7-R2, ©2005-2015 SA-MP Team

[13:20:59]
[13:20:59] Server Plugins
[13:20:59] --------------
[13:20:59] Loaded 0 plugins.

[13:20:59]
[13:20:59] Filterscripts
[13:20:59] ---------------
[13:20:59] Loading filterscript 'gl_actions.amx'...
[13:20:59] Loading filterscript 'gl_realtime.amx'...
[13:20:59] Loading filterscript 'gl_property.amx'...
[13:20:59]
-----------------------------------
[13:20:59] Grand Larceny Property Filterscript
[13:20:59] -----------------------------------

[13:20:59] Loading filterscript 'gl_mapicon.amx'...
[13:20:59] Loading filterscript 'ls_elevator.amx'...
[13:20:59] Loading filterscript 'attachments.amx'...
[13:20:59] Loading filterscript 'skinchanger.amx'...
[13:20:59]
--Admin Player Skin Changer Loaded

[13:20:59] Loading filterscript 'vspawner.amx'...
[13:20:59]
--Admin Vehicle Spawner Loaded

[13:20:59] Loading filterscript 'ls_mall.amx'...
[13:20:59] Loading filterscript 'ls_beachside.amx'...
[13:20:59]

[13:20:59] |---------------------------------------------------
[13:20:59] |--- LS BeachSide Filterscript
[13:20:59] |-- Script v1.03
[13:20:59] |-- 19th April 2015
[13:20:59] |---------------------------------------------------
[13:20:59] |-- LS BeachSide Building Elevator created
[13:20:59] |---------------------------------------------------
[13:20:59] Loaded 10 filterscripts.

[13:20:59] Loaded 3 vehicles from: vehicles/trains.txt
[13:20:59] Loaded 3 vehicles from: vehicles/pilots.txt
[13:20:59] Loaded 15 vehicles from: vehicles/lv_law.txt
[13:20:59] Loaded 39 vehicles from: vehicles/lv_airport.txt
[13:20:59] Loaded 255 vehicles from: vehicles/lv_gen.txt
[13:20:59] Loaded 38 vehicles from: vehicles/sf_law.txt
[13:20:59] Loaded 35 vehicles from: vehicles/sf_airport.txt
[13:20:59] Loaded 353 vehicles from: vehicles/sf_gen.txt
[13:20:59] Loaded 24 vehicles from: vehicles/ls_law.txt
[13:20:59] Loaded 37 vehicles from: vehicles/ls_airport.txt
[13:20:59] Loaded 98 vehicles from: vehicles/ls_gen_inner.txt
[13:20:59] Loaded 389 vehicles from: vehicles/ls_gen_outer.txt
[13:20:59] Loaded 71 vehicles from: vehicles/whetstone.txt
[13:20:59] Loaded 168 vehicles from: vehicles/bone.txt
[13:20:59] Loaded 61 vehicles from: vehicles/flint.txt
[13:20:59] Loaded 96 vehicles from: vehicles/tierra.txt
[13:20:59] Loaded 96 vehicles from: vehicles/red_county.txt
[13:20:59] Total vehicles from files: 1781
[13:20:59] Reading File: blank
[13:20:59] Reading File: properties/houses.txt
[13:20:59] Reading File: properties/businesses.txt
[13:20:59] Reading File: properties/banks.txt
[13:20:59] Reading File: properties/police.txt
[13:20:59]
---------------------------------------
[13:20:59] Running Grand Larceny - by the SA-MP team

[13:20:59] ---------------------------------------

[13:20:59] Number of vehicle models: 173
Reply
#7

In server conf:

gamemode0 grandlarc 1
gamemode1 other_gm 1


in script:
PHP код:
public OnGameModeInit() {
   
SetTimer("OnServerRestartTimerEnd"true6*1000*60);
   return 
1;
}

forward public OnServerRestartTimerEnd();
public 
OnServerRestartTimerEnd() return SendRconCommand("gmx"); 
i believe this is how SAMP servers operate, i might be wrong as i've never done it this way
Reply
#8

every 6 minutes you want it to change?

send rcon message /rcon changemode [mode_here]
send rcon message /rcon gmx
Reply
#9

forward public OnServerRestartTimerEnd();
public OnServerRestartTimerEnd() return SendRconCommand("gmx");
return 1;
}

where should paste it?
Reply
#10

Quote:
Originally Posted by rfr
Посмотреть сообщение
every 6 minutes you want it to change?

send rcon message /rcon changemode [mode_here]
send rcon message /rcon gmx
i want to change it automaticily if i not ingame too
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)