AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Say /icons on joining (https://forums.alliedmods.net/showthread.php?t=154493)

Podarok 04-09-2011 11:53

Say /icons on joining
 
Hello I'm using war3ft.amxx RC 3.0 and I want when player connected to my server, comand /icons will automaticaly enabled for him! I mean when he joins server (any team) he will automaticaly types in chat /icons .

reinert 04-09-2011 13:49

Re: Say /icons on joining
 
PHP Code:

public client_putinserver(id)
{
     if(!
is_user_connected(id) || is_user_connecting(id))
          return 
PLUGIN_HANDLED;

     
set_task(0.1"iconsON"id)
}

public 
iconsON(id)
{
     
client_cmd(id"say /icons")


Or better way open up your icons .sma search for /icons array, and change it from false to true or from 0 to 1.

ConnorMcLeod 04-09-2011 13:51

Re: Say /icons on joining
 
You forgot to declare client_putinserver as public, and also it may be to early to make player excute some commands.

reinert 04-09-2011 13:53

Re: Say /icons on joining
 
/* FIXED */

ConnorMcLeod 04-09-2011 14:42

Re: Say /icons on joining
 
0.1 delay should be ok, IF doesn't work directly in putinserver.

bibu 04-09-2011 14:45

Re: Say /icons on joining
 
Check if user is connected at all.

Podarok 04-10-2011 11:18

Re: Say /icons on joining
 
icons.sma(3) : error 017: undefined symbol "is_user_connected"
icons.sma(4) : error 017: undefined symbol "PLUGIN_HANDLED"
icons.sma(6) : error 017: undefined symbol "set_task"
icons.sma(11) : error 017: undefined symbol "client_cmd"

4 Errors.

Isnt compiling :(((

reinert 04-10-2011 11:25

Re: Say /icons on joining
 
Well it's not complete plugin, it's only the part of the code, there also should be plugin_init in it and includes aswell..

bibu 04-10-2011 12:47

Re: Say /icons on joining
 
@OP: why dont you post in the request forum if you dont know the basics of amxx


All times are GMT -4. The time now is 19:47.

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