AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   need a more editng about tag (https://forums.alliedmods.net/showthread.php?t=107412)

jondd 10-26-2009 09:31

need a more editng about tag
 
PHP Code:


#include   

new const PRE_TAG[] = "" 
new const POST_TAG[] = ""

public plugin_init() 

    
register_plugin("Tag,"1.0","Fysiks") 


public client_putinserver(id) 

    new name[33] 
    get_user_name(id,name,32) 

    format(name, charsmax(name), "
%s%s%s", PRE_TAG, name, POST_TAG) 

    set_user_info(id, "
name", name) 



jondd 10-26-2009 09:39

Re: need a more editng
 
PHP Code:

can this 
new const PRE_TAG[] = "" 
new const POST_TAG[] = "" 

be placed in tag.ini file...or from console i can set tag for team like
CT "BLUE!!" and
T "FIRE||"

jondd 10-28-2009 03:46

Re: need a more editng-(Flysiks)
 
did u edit it.?//

micke1101 10-28-2009 04:24

Re: need a more editng-(Flysiks)
 
Code:

#include 

new const PRE_TAG[] = ""
new const POST_TAG[] = ""

public plugin_init()
{
    register_plugin("Tag,"1.0","Fysiks")
}

public client_putinserver(id)
{
    new name[33]
    get_user_name(id,name,32)

    format(name, charsmax(name), "%s%s%s", PRE_TAG, name, POST_TAG)

    set_user_info(id, "name", name)
}

You should include something :)

Code:
#include
-->
Code:
#include <amxmodx>

and also i may be wrong (i usually have when it comes to arrays -.-)

Code:
format(name, charsmax(name), "%s%s%s", PRE_TAG, name, POST_TAG)
-->
Code:
format(name, 32, "%s%s%s", PRE_TAG, name, POST_TAG)

Xellath 10-28-2009 04:50

Re: need a more editng-(Flysiks)
 
Quote:

Originally Posted by micke1101 (Post 974111)
Code:
format(name, charsmax(name), "%s%s%s", PRE_TAG, name, POST_TAG)
-->
Code:
format(name, 32, "%s%s%s", PRE_TAG, name, POST_TAG)

Both ways are correct. You see, charsmax() retrieves the size of the string - 1, so in that case: 33 - 1 equals 32.

@ jondd
I don't see the problem, the code is fine. What do you want?

jondd 10-28-2009 04:52

Re: need a more editng
 
Quote:

Originally Posted by jondd (Post 972576)
PHP Code:

can this 
new const PRE_TAG[] = "" 
new const POST_TAG[] = "" 

be placed in tag.ini file...or from console i can set tag for team like
CT "BLUE!!" and
T "FIRE||"

I want this !!!

xPaw 10-28-2009 06:56

Re: need a more editng-(Flysiks)
 
lordshiva leave this forums alone

Jelle 10-28-2009 07:05

Re: need a more editng-(Flysiks)
 
PHP Code:


#include   <amxmodx>

new const PRE_TAG[] = "" 
new const POST_TAG[] = ""

public plugin_init() 

    
register_plugin("Tag","1.0","Fysiks"


public 
client_putinserver(id

    new 
name[33
    
get_user_name(id,name,32

    
format(namecharsmax(name), "%s%s%s"PRE_TAGnamePOST_TAG

    
set_user_info(id"name"name


Just a small fix. You forgot " in the register_plugin and the include.

However, I have no idea what you want.

micke1101 10-28-2009 07:26

Re: need a more editng-(Flysiks)
 
Jelle if youd read the thread you know that has already been mentioned.
And that what he want is a file (id suggest a cvar) that he can write a tag that is added to players name when they join in that file.
Also a command that does the same thing

Jelle 10-28-2009 07:32

Re: need a more editng-(Flysiks)
 
Quote:

Originally Posted by micke1101 (Post 974196)
Jelle if youd read the thread you know that has already been mentioned.
And that what he want is a file (id suggest a cvar) that he can write a tag that is added to players name when they join in that file.
Also a command that does the same thing

The include has been mentioned yes, but the mistake in register_plugin was not mentioned anywhere.

I did not see what he wanted because of his bad english, sorry.


All times are GMT -4. The time now is 17:43.

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