Raised This Month: $ Target: $400
 0% 

Enums


Post New Thread Reply   
 
Thread Tools Display Modes
EpicMonkey
buttmonkey
Join Date: Feb 2012
Old 05-05-2012 , 09:11   Re: Enums
Reply With Quote #11

Am trying this:

PHP Code:
#include <amxmodx>
#include <amxmisc>

new Test[33]

#define PLUGIN "Test"
#define VERSION "1.0"
#define AUTHOR "Test"


public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /test""Func")
    
register_clcmd("say /show""Show")
}

public 
Func(id)
{
    
formatex(Testcharsmax(Test), "Test")
}

public 
Show(id)
{
    
client_print(idprint_chat"[AMXX] Test : %s"Test[id])

Its supposed to print Test , but it prints est ... eats up the T

Last edited by EpicMonkey; 05-05-2012 at 09:11.
EpicMonkey is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-05-2012 , 09:21   Re: Enums
Reply With Quote #12

You need a 2 dimensions array for this, if you want to have a player specific text.

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define MAX_PLAYERS    32
#define MAX_STRING_LENGTH 32

new Test[MAX_PLAYERS 1][MAX_STRING_LENGTH]

#define PLUGIN "Test"
#define VERSION "1.0"
#define AUTHOR "Test"


public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /test""Func")
    
register_clcmd("say /show""Show")
}

public 
Func(id)
{
    
formatex(Test[id], charsmax(Test[]), "Test")
}

public 
Show(id)
{
    
client_print(idprint_chat"[AMXX] Test : %s"Test[id])

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
EpicMonkey
buttmonkey
Join Date: Feb 2012
Old 05-05-2012 , 11:04   Re: Enums
Reply With Quote #13

i see , anyways thank you
EpicMonkey 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 04:14.


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