Raised This Month: $ Target: $400
 0% 

Problems Makign Cvars work


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dizzy
Veteran Member
Join Date: Jun 2004
Location: Massachusetts
Old 08-05-2004 , 00:44   Problems Makign Cvars work
Reply With Quote #1

Ok... I Have 4 plugins that will hook into a mod

Now Here's What I have


Code:
/*Air From the Elements Mod By: Dizzy*/ #include <amxmodx> #include <cstrike> public plugin_init() { register_plugin"Air","1.0","Dizzy") register_cvar"sv_airaccelerate","-10") }

and

Code:
/*Graivity From the Elements Mod By: Dizzy*/ #include <amxmodx> #include <cstrike> public plugin_init() { register_plugin"Gravity","1.0","Dizzy") register_cvar"sv_gravity","200") }

and

Code:
/*Speed From the Elements Mod By: Dizzy*/ #include <amxmodx> #include <cstrike> public plugin_init() { register_plugin"Speed","1.0","Dizzy") register_cvar"sv_speed","400") }

The Fire I can't get to work I have no Idea

Now the question on them when I have sv_speed 400 How do I actually make that work!?

Some one help?
__________________
My Plugins

Purchase Mod - Stable
Type Sounds - Stable
Monster Spawner - Stable
Nade Giver - Maintenance
Dizzy is offline
Send a message via AIM to Dizzy
johnjg75
Veteran Member
Join Date: Mar 2004
Location: Delaware
Old 08-05-2004 , 00:48  
Reply With Quote #2

well when u do register_cvar u didnt put ( like
Code:
register_cvar("cvar","num")
__________________
johnjg75 is offline
Send a message via AIM to johnjg75 Send a message via MSN to johnjg75 Send a message via Yahoo to johnjg75
Burnzy
Veteran Member
Join Date: Apr 2004
Old 08-05-2004 , 00:49  
Reply With Quote #3

set_user_maxspeed
__________________
Burnzy is offline
Send a message via AIM to Burnzy
Peli
Veteran Member
Join Date: Mar 2004
Location: San Diego, CA
Old 08-05-2004 , 00:51  
Reply With Quote #4

Code:
/*Speed From the Elements Mod By: Dizzy*/ #include <amxmodx> #include <cstrike> public plugin_init() { register_plugin("Speed","1.0","Dizzy") register_cvar("sv_speed","400") } public sv_speed { new speed = get_cvar_num("sv_speed") set_user_maxspeed(id,speed)  return PLUGIN_HANDLED }
Peli is offline
Send a message via MSN to Peli
johnjg75
Veteran Member
Join Date: Mar 2004
Location: Delaware
Old 08-05-2004 , 00:53  
Reply With Quote #5

omg...
__________________
johnjg75 is offline
Send a message via AIM to johnjg75 Send a message via MSN to johnjg75 Send a message via Yahoo to johnjg75
Peli
Veteran Member
Join Date: Mar 2004
Location: San Diego, CA
Old 08-05-2004 , 00:58  
Reply With Quote #6

What? EDIT : Just noticed , fixed the same problem he put lol.
Peli is offline
Send a message via MSN to Peli
johnjg75
Veteran Member
Join Date: Mar 2004
Location: Delaware
Old 08-05-2004 , 01:00  
Reply With Quote #7

do register_event instead of register_cvar
__________________
johnjg75 is offline
Send a message via AIM to johnjg75 Send a message via MSN to johnjg75 Send a message via Yahoo to johnjg75
Dizzy
Veteran Member
Join Date: Jun 2004
Location: Massachusetts
Old 08-05-2004 , 01:04  
Reply With Quote #8

Ok Thank Guys
__________________
My Plugins

Purchase Mod - Stable
Type Sounds - Stable
Monster Spawner - Stable
Nade Giver - Maintenance
Dizzy is offline
Send a message via AIM to Dizzy
Peli
Veteran Member
Join Date: Mar 2004
Location: San Diego, CA
Old 08-05-2004 , 01:05  
Reply With Quote #9

Yes , it would be better to do a event than a cvar. Like this right :
Code:
/*Speed From the Elements Mod By: Dizzy*/ #include <amxmodx> #include <cstrike> public plugin_init() {   register_plugin("Speed","1.0","Dizzy")   register_event("ResetHUD","respawn","b") } public respawn(id) {   new players[32], numberofplayers   get_players(players,numberofplayers)   new i   for(i = 1 ; i <= numberofplayers ;i++) {     set_user_maxspeed(i,float(400))      }       return PLUGIN_HANDLED }
Peli is offline
Send a message via MSN to Peli
Dizzy
Veteran Member
Join Date: Jun 2004
Location: Massachusetts
Old 08-05-2004 , 01:14  
Reply With Quote #10

Some One help with the fire? Please?

I want the person if they select it from the menu to be set on fire. The fire doesn't hurt them but anyone else that isn't fire gets hurt

They also can't buy a weapon
__________________
My Plugins

Purchase Mod - Stable
Type Sounds - Stable
Monster Spawner - Stable
Nade Giver - Maintenance
Dizzy is offline
Send a message via AIM to Dizzy
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 22:07.


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