Raised This Month: $32 Target: $400
 8% 

Pre-name defining


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ingmar13
Member
Join Date: Jun 2008
Old 11-26-2011 , 11:33   Pre-name defining
Reply With Quote #1

PHP Code:
public commandid )
{
    new const 
sPrename[] = "[lametext]";
    
//randomcommands
    
    
client_printidprint_chat"%s subtext: %s",sPrename); 


How to put this above i tried

const sPrename[] = "[lametext]";

it had a lot of issues..
__________________
will make maps for food!

Last edited by ingmar13; 11-26-2011 at 11:34.
ingmar13 is offline
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 11-26-2011 , 11:35   Re: Pre-name defining
Reply With Quote #2

What? Is this?

PHP Code:
#define sPrename "[lametext]"

public command(id)
{
    
client_print(idprint_chat"%s"sPrename)

__________________
kramesa is offline
ingmar13
Member
Join Date: Jun 2008
Old 11-26-2011 , 11:39   Re: Pre-name defining
Reply With Quote #3

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

#define PLUGIN_NAME    "mGodmode"
#define PLUGIN_VERSION    "1.0"
#define PLUGIN_AUTHOR    "Malle"

const FLAG_GODMODE = (<< 0);

new 
g_iFlags[33];

public 
plugin_init( )
{
    
register_plugin"mGodmode""1.0""Malle" )
    
register_clcmd"say /god""cmdgod" )
    
register_clcmd"say /godmode""cmdgod" )
}

public 
client_disconnect(iPlayer)
{
    
g_iFlags[iPlayer] = 0;
}

public 
cmdgodid )
{
    new const 
sPrename[] = "[mGod]";
    
g_iFlags[id] ^= FLAG_GODMODE;
    
    
client_printidprint_chat"%s Yo DAWG you turned your godmode: %s",sPrenameg_iFlagsid ] & FLAG_GODMODE "On" "Off" );
    
    
set_user_godmodeid, !!( g_iFlagsid ] & FLAG_GODMODE) );
    
    return 
PLUGIN_HANDLED;

i got this code but i want the prename to be a head structure like
const FLAG_GODMODE = (1 << 0); is.. how ?



Oh..

solution:

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

#define PLUGIN_NAME    "mGodmode"
#define PLUGIN_VERSION    "1.0"
#define PLUGIN_AUTHOR    "Malle"

const FLAG_GODMODE = (<< 0);

new 
g_iFlags[33];
new const 
sPrename[] = "[mGod]";

public 
plugin_init( )
{
    
register_plugin"mGodmode""1.0""Malle" )
    
register_clcmd"say /god""cmdgod" )
    
register_clcmd"say /godmode""cmdgod" )
}

public 
client_disconnect(iPlayer)
{
    
g_iFlags[iPlayer] = 0;
}

public 
cmdgodid )
{
    new const 
sPrename[] = "[mGod]";
    
g_iFlags[id] ^= FLAG_GODMODE;
    
    
client_printidprint_chat"%s Yo DAWG you turned your godmode: %s",sPrenameg_iFlagsid ] & FLAG_GODMODE "On" "Off" );
    
    
set_user_godmodeid, !!( g_iFlagsid ] & FLAG_GODMODE) );
    
    return 
PLUGIN_HANDLED;

__________________
will make maps for food!

Last edited by ingmar13; 11-26-2011 at 11:40.
ingmar13 is offline
Reply


Thread Tools
Display Modes

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 12:43.


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