AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   server_cmd (https://forums.alliedmods.net/showthread.php?t=46032)

Nostrodamous 10-17-2006 01:33

server_cmd
 
hi , im having a problem with executing server comands . i want this part of my code to execute a lsit of settings and server commands on my server , but its not working or doing anything . I looked in the amxmodx doc , but it doesnt show the right way to use it . so heres what that part of my script looks like :up:
Code:
server_cmd("humans_join_team" , "any");  server_cmd("mp_autoteambalance" , "1");  server_cmd("mp_limitteams" , "1");  server_cmd("mp_c4tmer" , "45");  server_cmd("mp_freezetime" , "6");  server_cmd("mp_friendlyfire" , "1");  server_cmd("mp_tkpunish" , "1");  server_cmd("sv_alltalk" , "0");  server_cmd("sv_gravity" , "800");  server_cmd("amx_awppv" , "0");  server_cmd("DF_hook_on" , "0");
so can someone tell me how im using them wrong? thank you :up:

Freecode 10-17-2006 01:34

Re: server_cmd
 
you are using the native in a wrong way
http://www.amxmodx.org/funcwiki.php?go=func&id=232

teame06 10-17-2006 01:34

Re: server_cmd
 
http://www.amxmodx.org/funcwiki.php?...cvar&go=search

http://www.amxmodx.org/funcwiki.php?..._cmd&go=search
As stated in the funcwiki don't use this function to set cvar.

Nostrodamous 10-17-2006 01:37

Re: server_cmd
 
wow that was a super - uber- fast response , thanks guys :up: I read that too when I went over the doc , I didnt think of the way i was using it as setting cvars , I thought setting cvars was considerred register_cvar . Ok ill try those commands out and see if they work . thanks alot guys + karma :up:

EDIT ; ok i have on more question about the server_cmd function . can it be used to execute a restart server command , if it it can do i need to use rcon restart or just restart ? thanks again guys :up:

Freecode 10-17-2006 02:47

Re: server_cmd
 
use what you would use in a server console.

Nostrodamous 10-17-2006 02:52

Re: server_cmd
 
sweet thanks again , ill go try it out :)


All times are GMT -4. The time now is 04:49.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.