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

Capture the Hax help...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ev0d00b
Member
Join Date: Aug 2005
Location: Middle Earth
Old 11-10-2005 , 21:23   Capture the Hax help...
Reply With Quote #1

this is my first plugin and im a little lost in what to do so far ive got this

Code:
#include <amxmodx> #include <fun> #define PLUGIN "Capture the Hax" #define VERSION "1.0" #define AUTHOR "ev0d00b" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         register_cvar("amx_cth", "1")         register_logevent("Round_Start", 2, "0=World triggered", "1=Round_Start") } new hacker  hacker = random(1, get_maxplayers());{     is_user_alive(){         if(is_user_alive = 1);{                 return PLUGIN_CONTINUE         }  new hackerName[32];   get_user_name(hacker,hackerName,31)  set_user_maxspeed (hacker,[ Float:speed = - 2.0 ]

and at the moe it wont do anything but im hoping that this will randomly pick someone and make them run faster please help me.
ev0d00b is offline
Send a message via MSN to ev0d00b
Zenith77
Veteran Member
Join Date: Aug 2005
Old 11-10-2005 , 21:34  
Reply With Quote #2

here ya go ;)


Code:
#include <amxmodx> #include <fun> #define PLUGIN "Capture the Hax" #define VERSION "1.0" #define AUTHOR "ev0d00b" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         register_cvar("amx_cth", "1")         register_logevent("Round_Start", 2, "0=World triggered", "1=Round_Start") } public Round_Start() {  new id   chooseRandomPlayer(id)  if( id == 0 ) return PLUGIN_HANDLED  new hackerName[32];  get_user_name(id,hackerName,31)  set_user_maxspeed (id, -2.0 ) } public chooseRandomPlayer(index) {  index = random_num(1, get_maxplayers())  if(!is_user_alive(index) ) {        index = 0      set_task(0.1, "Restart_Rount" ) // give the funciton time to execute      return index   }  return index // every thing is a-ok }


But there are still other problems, I dont know if this is the complete code or not.

If you run into any problems just post back ;)
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 11-10-2005 , 21:35  
Reply With Quote #3

Meh.. Try this:
Code:
#include <amxmodx> #include <fun> #define PLUGIN "Capture the Hax" #define VERSION "1.0" #define AUTHOR "ev0d00b" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_cvar("amx_cth", "1")     register_logevent("Round_Start", 2, "0=World triggered", "1=Round_Start")     register_event("CurWeapon", "Check_Speed", "be")     set_cvar_num("sv_maxspeed", 1000) } new hacking[33]; new last_hacker; public client_connect(id)   hacking[id] = 0; public client_disconnect(id)   hacking[id] = 0; public Round_Start() {   if(!get_cvar_num("amx_cth"))     return PLUGIN_CONTINUE;   hacking[last_hacker] = 0;   new hacker = random_num(1, get_maxplayers());   if(is_user_connected(hacker) && is_user_alive(hacker))   {     new hackerName[32];     get_user_name(hacker, hackerName, 31);     hacking[hacker] = 1;     last_hacker = hacker;     client_print(0, print_chat, "%s is haxing! zomg", hackerName);   }   else   {     Round_Start();   }   return PLUGIN_CONTINUE; } public Check_Speed(id) {   if(hacking[id] == 1)     set_user_maxspeed(id, 999.0); }
__________________
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
ev0d00b
Member
Join Date: Aug 2005
Location: Middle Earth
Old 11-10-2005 , 22:27  
Reply With Quote #4

omg thanks heaps. and thats only a fraction of it though unfortunatly. i still play to make the hacker glow, and that when some kills the hacker steals the hacks and gets it em self.

l0l "zomg"

thank you.

i may need some help with the getting the hacks off another person though glowing i should be fine.
ev0d00b is offline
Send a message via MSN to ev0d00b
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 11-10-2005 , 22:33  
Reply With Quote #5

Well, my version automatically takes it off of whoever was last. Although I didn't add checking to see if the player selected already had it last round
__________________
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
ev0d00b
Member
Join Date: Aug 2005
Location: Middle Earth
Old 11-10-2005 , 22:37  
Reply With Quote #6

yea what i think it needs is.

Code:
register_logevent("Game_Commencing", 2, "0=World triggered", "Game_Commencing ")

or something along those lines
ev0d00b is offline
Send a message via MSN to ev0d00b
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 11-10-2005 , 22:45  
Reply With Quote #7

Shouldn't need that
__________________
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
ev0d00b
Member
Join Date: Aug 2005
Location: Middle Earth
Old 11-10-2005 , 22:46  
Reply With Quote #8

now im lost and confused

mind helping me?
ev0d00b is offline
Send a message via MSN to ev0d00b
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 11-10-2005 , 22:53  
Reply With Quote #9

Ahem.

Code:
new players[32], num; get_players(players, num); new randPlayer = players[random_num(0,num-1)];
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
ev0d00b
Member
Join Date: Aug 2005
Location: Middle Earth
Old 11-10-2005 , 22:59  
Reply With Quote #10

Quote:
Originally Posted by XxAvalanchexX
Ahem.

Code:
new players[32], num; get_players(players, num); new randPlayer = players[random_num(0,num-1)];
in replace of this?

Code:
new hacker = random_num(1, get_maxplayers());   if(is_user_connected(hacker) && is_user_alive(hacker))
ev0d00b is offline
Send a message via MSN to ev0d00b
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 07:12.


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