AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Need HELP!! (https://forums.alliedmods.net/showthread.php?t=162872)

raghunarnindi001 07-24-2011 01:23

Need HELP!!
 
I am learning Scripting ..... I have these questions with me :D

1. i want to exec from server console how to do that

PHP Code:

server_exec() 

plz tell how to use this command

2. i am getting undefined symbol error and argument matches error when i am compiling

3. can i stop a function\cvar which is being used by another plugin . if yes , plz tell how

Exolent[jNr] 07-24-2011 04:17

Re: Need HELP!!
 
server_exec() does not take any parameters.
Also, that is not how you execute server commands.

Use server_cmd().

raghunarnindi001 07-25-2011 09:52

Re: Need HELP!!
 
K... :) But for 2 and 3

??

PLZ HELP!!

Exolent[jNr] 07-25-2011 10:04

Re: Need HELP!!
 
Your argument mismatch should be fixed by the server_exec() changed to server_cmd().
If not, then post your whole code.

You can use a server/console command which sets values rather than a cvar.
Though the plugin can just send a server command to set that value.

You could use a menu where admins can set the values.
Or you could use a file and read from it, though that's more of a hassle to change values.

raghunarnindi001 07-27-2011 03:22

Re: Need HELP!!
 
PHP Code:

server_cmd 

didnt work can u plz give an demonstration to "changelevel " command

Exolent[jNr] 07-27-2011 10:56

Re: Need HELP!!
 
Code:
server_cmd("command")

Replace command with the command you want sent to the server console.

It also allows formatting if you need it.
For example:
Code:
server_cmd("kick #%d ^"Too fat for this server.^"", get_user_userid(id))

raghunarnindi001 07-28-2011 10:16

Re: Need HELP!!
 
i am asking for "changelevel " command
PHP Code:

server_cmd" changelevel de_minidust2 " 

does this work ??

Exolent[jNr] 07-28-2011 10:24

Re: Need HELP!!
 
Using server_cmd() is the same as entering the command into the server console.
You should be able to answer that question yourself.


All times are GMT -4. The time now is 00:54.

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