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

variable in hudmessage?


Post New Thread Reply   
 
Thread Tools Display Modes
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 03-30-2005 , 09:57  
Reply With Quote #11

Ooh thanks JGHG.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
the thing
Junior Member
Join Date: Mar 2005
Location: Germany, NRW, AC
Old 03-30-2005 , 15:57  
Reply With Quote #12

is this variable stuff working like this too ?

Code:
public anything() {                 new plname = "Franz"     new infomsg = "some text %d", plname     client_print(id, print_chat, infomsg) }

does this work like this ?
__________________
the thing is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 03-30-2005 , 17:45  
Reply With Quote #13

@Belsebub:
Code:
// VARIABLES new constitution[33] = 0 new hp[33] = 10 * (constitution[id]) // Put that above like so - new constitution[33] = 0 new pointsleft[33] = 5

@the thing:
Use format()..
Code:
public anything(id) {     new infomsg[64]     format(infomsg,63,"some text %d", plname)     client_print(id,print_chat,infomsg) }
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
TotalNoobScripter
Senior Member
Join Date: Aug 2004
Old 03-30-2005 , 19:35  
Reply With Quote #14

Code:
// VARIABLES 
new constitution[33] = 0 
new hp[33] = 10 * (constitution[id]) 
// Put that above like so - new constitution[33] = 0 
new pointsleft[33] = 5
wouldnt the array hp itself be equal to 0 if declared like that?
also, by doing

new constitution[33] = 0
new hp[33] = 10 * (constitution[id])

hp[33] will always turn out 0; which might be bad if your trying to get someones hp.
TotalNoobScripter is offline
Send a message via AIM to TotalNoobScripter
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 03-30-2005 , 19:38  
Reply With Quote #15

I was just telling him how to get rid of the damn error.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Belsebub
Senior Member
Join Date: Feb 2005
Location: Sweden
Old 03-31-2005 , 10:33  
Reply With Quote #16

ok i tried that but now i get theese errors:

Code:
(9) : error 017: undefined symbol "id"
(9 -- 10) : error 008: must be a constant expression; assumed zero
the plugin:

Code:
//----------------------------------------------------------------------------------------------  #include <amxmodx>  #include <amxmisc>  #include <engine>  #include <fun>  //----------------------------------------------------------------------------------------------  // VARIABLES  new constitution[33] = 1  new hp[33] = 10 * (constitution[id])  new pointsleft[33] = 5  //----------------------------------------------------------------------------------------------  public plugin_init()  {     register_plugin("Stats", "1.0", "Belsebub")     register_menucmd(register_menuid("Stats Menu"), 1023, "ActionMenu")     register_clcmd("say /statsmenu", "ShowMenu", -1, "Shows The stats menu")     register_event("ResetHUD", "Event_Resethud", "a")  }  //----------------------------------------------------------------------------------------------  public ShowMenu(id)  {     new szMenuBody[256]     new keys     new len = format( szMenuBody, 255, "Stats Menu:^nPoints Left:%d^n",pointsleft )     len += format( szMenuBody[len], 255-len, "^n\w1. Constitution (%d)",constitution )     len += format( szMenuBody[len], 255-len, "^n\w2. Nothing" )     len += format( szMenuBody[len], 255-len, "^n\w3. Nothing" )     len += format( szMenuBody[len], 255-len, "^n\w4. Nothing" )     len += format( szMenuBody[len], 255-len, "^n\w5. Exit" )     keys = (1<<0|1<<1|1<<2|1<<3|1<<4)     show_menu( id, keys, szMenuBody, -1 )     return PLUGIN_CONTINUE  }  //----------------------------------------------------------------------------------------------  public ActionMenu(id, key)  {     switch(key)     {         case 0:         {             constitution[id] += 1             pointsleft[id] -= 1         }         case 1:         {             return PLUGIN_HANDLED         }         case 2:         {             return PLUGIN_HANDLED         }         case 3:         {             return PLUGIN_HANDLED         }         case 4:         {             return PLUGIN_HANDLED         }     }     return PLUGIN_CONTINUE  }  //----------------------------------------------------------------------------------------------  public Event_Resethud(id)  {     if (constitution[id] == 1) {         return PLUGIN_CONTINUE     }     new health = get_user_health ( id )     set_user_health(id, health + hp[id])     return PLUGIN_CONTINUE  }  //----------------------------------------------------------------------------------------------
Belsebub is offline
EKS
Veteran Member
Join Date: Mar 2004
Location: Norway
Old 04-01-2005 , 10:00  
Reply With Quote #17

learn how to wait on irc
__________________
Github archive for plugins, the repos for the other c++ projects are there to.
EKS is offline
Belsebub
Senior Member
Join Date: Feb 2005
Location: Sweden
Old 04-01-2005 , 15:18  
Reply With Quote #18

started a new topic for help with my plugins http://forums.alliedmods.net/showthr...=101613#105447
Belsebub 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 16:35.


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