Raised This Month: $ Target: $400
 0% 

Say /icons on joining


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Podarok
BANNED
Join Date: Jan 2011
Location: Narnia
Old 04-09-2011 , 11:53   Say /icons on joining
Reply With Quote #1

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 .
Podarok is offline
reinert
Veteran Member
Join Date: Feb 2007
Old 04-09-2011 , 13:49   Re: Say /icons on joining
Reply With Quote #2

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.

Last edited by reinert; 04-09-2011 at 15:34.
reinert is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-09-2011 , 13:51   Re: Say /icons on joining
Reply With Quote #3

You forgot to declare client_putinserver as public, and also it may be to early to make player excute some commands.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
reinert
Veteran Member
Join Date: Feb 2007
Old 04-09-2011 , 13:53   Re: Say /icons on joining
Reply With Quote #4

/* FIXED */
reinert is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-09-2011 , 14:42   Re: Say /icons on joining
Reply With Quote #5

0.1 delay should be ok, IF doesn't work directly in putinserver.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 04-09-2011 , 14:45   Re: Say /icons on joining
Reply With Quote #6

Check if user is connected at all.
bibu is offline
Podarok
BANNED
Join Date: Jan 2011
Location: Narnia
Old 04-10-2011 , 11:18   Re: Say /icons on joining
Reply With Quote #7

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 ((
Podarok is offline
reinert
Veteran Member
Join Date: Feb 2007
Old 04-10-2011 , 11:25   Re: Say /icons on joining
Reply With Quote #8

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..
reinert is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 04-10-2011 , 12:47   Re: Say /icons on joining
Reply With Quote #9

@OP: why dont you post in the request forum if you dont know the basics of amxx
bibu is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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