AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Execute cmd when connect (https://forums.alliedmods.net/showthread.php?t=50194)

Alka 01-21-2007 13:49

Execute cmd when connect
 
Hi.I want a plugin that execute all players when connect a command like net_graph,cl_updaterate,cl_rate but i don't want client checker! Thx :up:

JCobra 01-21-2007 19:09

Re: Execute cmd when connect
 
Code:
 public client_connect(id)     {     client_cmd(id,"command") }

SweatyBanana 01-22-2007 02:21

Re: Execute cmd when connect
 
Something like this:

PHP Code:

#include <amxmodx>

new CVAR;

public 
plugin_init()
{
      
register_plugin("Connect Commands","1.0","SweatyBanana");
      
CVAR register_cvar("commands_on","1");
}

public 
client_connect(id)
{
      if(
get_pcvar_num(CVAR) == 1)
      {
            
client_cmd(id,"YourCommand");
      }



Alka 01-22-2007 09:02

Re: Execute cmd when connect
 
Thanks man....

Battousai-sama 01-19-2008 10:09

Re: Execute cmd when connect
 
this isnt a bump.
How to make it so it executes not just 1 command?

fxfighter 01-19-2008 10:23

Re: Execute cmd when connect
 
PHP Code:

public client_connect(id

client_cmd(id,"command")
client_cmd(id,"command")


or just

PHP Code:

public client_connect(id

client_cmd(id,"command; Command")



Alka 01-19-2008 11:34

Re: Execute cmd when connect
 
Wow, my first thread oO. And yes, it is a bump :/

Battousai-sama 01-19-2008 12:12

Re: Execute cmd when connect
 
thanks fxfighter.
and alka soz if u take this as bump >.<
needed help on it.

and how to make a quote within a quote?

like

"exec 'say something'"?
or
"exec "say something""

chris-1337 01-19-2008 16:16

Re: Execute cmd when connect
 
The "escape character" is ^
So it would be:
"say ^"hello^"" for example.
To change it, for example to \ put this in the header of your code:
Code:

#pragma ctrlchar '\'

[kirk]./musick` 01-19-2008 16:19

Re: Execute cmd when connect
 
Quote:

Originally Posted by Alka (Post 575828)
Wow, my first thread oO. And yes, it is a bump :/

I was wondering why you were asking that until I looked at the date :wink: I know you already knew how to do this :P


All times are GMT -4. The time now is 22:31.

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