Raised This Month: $51 Target: $400
 12% 

Is This A RIGHT CODE ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MerreBigger
Senior Member
Join Date: Nov 2012
Location: Belgium
Old 10-31-2013 , 16:36   Is This A RIGHT CODE ?
Reply With Quote #1

hi guys , this is my first code idk is this right ?

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Hudmessage"
#define VERSION "1.0"
#define AUTHOR "Merouane"

set_hudmessage(0, 0, 255, -1.0, -1.0)
show_hudmessage(id, "<MR HideNSeek get_playersnum/()
get_maxplayers() >")

{

}
MerreBigger is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 10-31-2013 , 16:53   Re: Is This A RIGHT CODE ?
Reply With Quote #2

No
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
MerreBigger
Senior Member
Join Date: Nov 2012
Location: Belgium
Old 10-31-2013 , 16:54   Re: Is This A RIGHT CODE ?
Reply With Quote #3

Help ?
MerreBigger is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 10-31-2013 , 16:59   Re: Is This A RIGHT CODE ?
Reply With Quote #4

No, go back to reading the tutorials
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Moody92
Veteran Member
Join Date: May 2011
Location: Oman
Old 10-31-2013 , 18:15   Re: Is This A RIGHT CODE ?
Reply With Quote #5

No functions = No plugin.
Moody92 is offline
dark_style
Senior Member
Join Date: Jul 2009
Location: Bulgaria
Old 11-01-2013 , 04:25   Re: Is This A RIGHT CODE ?
Reply With Quote #6

Telling what are you really trying to do, will help a lot.
__________________



dark_style is offline
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 11-01-2013 , 06:32   Re: Is This A RIGHT CODE ?
Reply With Quote #7

What are you trying to do? By the way here is some example:
PHP Code:
#include <amxmodx>

#define PLUGIN "HUD MaxPlayers"
#define VERSION "0.0.1"
#define AUTHOR "wbyokomo"

new iMaxClients

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
iMaxClients get_maxplayers()
}

//Use this function to show current status
FnShowStatus()
{
    
set_hudmessage(02550, -1.00.8106.012.0)
    
show_hudmessage(0"<MR HideNSeek: %d/%d>"get_playersnum(), iMaxClients)

And this is a plugin to show player count on hostname:
PHP Code:
#include <amxmodx>

#define PLUGIN "Hostname Status"
#define VERSION "0.0.1"
#define AUTHOR "wbyokomo"

new iMaxClients
new const CvarHostname[] = "hostname"
#define TASK_HOSTNAME 5102

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
iMaxClients get_maxplayers()
}

public 
client_putinserver()
{
    
//make it delay a bit to prevent spam changing hostname
    
if(!task_exists(TASK_HOSTNAME)) set_task(5.0"TaskShowStatus"TASK_HOSTNAME)
}

public 
client_disconnect()
{
    
//make it delay a bit to prevent spam changing hostname
    
if(!task_exists(TASK_HOSTNAME)) set_task(5.0"TaskShowStatus"TASK_HOSTNAME)
}

public 
TaskShowStatus()
{
    new 
szText[128]
    
format(szText127"<MR HideNSeek: %d/%d>"get_playersnum(), iMaxClients)
    
set_cvar_string(CvarHostnameszText)


Last edited by yokomo; 11-01-2013 at 06:48.
yokomo 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 18:43.


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