Raised This Month: $ Target: $400
 0% 

HOw to make for the team?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Poison_Jay
Senior Member
Join Date: May 2004
Old 06-24-2004 , 02:21   HOw to make for the team?
Reply With Quote #1

Code:
#include <amxmodx> #include <fun> public plugin_init() {     register_plugin("Shield War","1","Poison_Jay");     register_event("CurWeapon","shield","be","1=1")     register_cvar("amx_shieldwar","1"); } public shield(id) {     if(get_cvar_num("amx_shieldwar")==0)            return PLUGIN_CONTINUE                 if(get_cvar_num("amx_shieldwar")==1) {         give_item(id,"weapon_shield")         give_item(id,"weapon_deagle")         give_item(id,"ammo_50ae")         give_item(id,"ammo_50ae")         give_item(id,"ammo_50ae")         give_item(id,"ammo_50ae")         give_item(id,"ammo_50ae")     }     return PLUGIN_HANDLED }

does it look right?

how to add xs?
Poison_Jay is offline
Send a message via MSN to Poison_Jay
Peli
Veteran Member
Join Date: Mar 2004
Location: San Diego, CA
Old 06-24-2004 , 02:29  
Reply With Quote #2

Looks good , no errors , test it for bugs in-game though. About your question , what do you mean : "how to add xs?" I'd also sugguest that you : Add a hudmessage that will say "Shieldwar mode has been enabled" when the cvar is set to 1. If you need help doing that , I could do it for you.
Peli is offline
Send a message via MSN to Peli
Poison_Jay
Senior Member
Join Date: May 2004
Old 06-24-2004 , 02:48  
Reply With Quote #3

okay. that will be great
Poison_Jay is offline
Send a message via MSN to Poison_Jay
Peli
Veteran Member
Join Date: Mar 2004
Location: San Diego, CA
Old 06-24-2004 , 03:02  
Reply With Quote #4

Okay here is the plugin. :
NOTE : At the top where it says :
#define TIME 5.0
( You can change the number from 5 seconds to however long you want the message to be shown on the center of the screen )
Code:
#define TIME 5.0 #include <amxmodx> #include <fun> public plugin_init() {     register_plugin("Shield War","1","Poison_Jay");     register_event("CurWeapon","shield","be","1=1")     register_cvar("amx_shieldwar","1"); } public shield(id) {     if(get_cvar_num("amx_shieldwar")==0)            return PLUGIN_CONTINUE                   if(get_cvar_num("amx_shieldwar")==1) {         give_item(id,"weapon_shield")         give_item(id,"weapon_deagle")         give_item(id,"ammo_50ae")         give_item(id,"ammo_50ae")         give_item(id,"ammo_50ae")         give_item(id,"ammo_50ae")         give_item(id,"ammo_50ae")          set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, TIME, 0.5, 1.5, 4 )          show_hudmessage(0, "ShieldWar mode has been enabled")     }     return PLUGIN_HANDLED }
Peli is offline
Send a message via MSN to Peli
Poison_Jay
Senior Member
Join Date: May 2004
Old 06-24-2004 , 04:23  
Reply With Quote #5

so if if it is enabled, everyround does everyone get shield and deagle?

and wat if i want it instant? do i just remove that whole line?
Poison_Jay is offline
Send a message via MSN to Poison_Jay
Poison_Jay
Senior Member
Join Date: May 2004
Old 06-24-2004 , 08:20  
Reply With Quote #6

i mean like u need to be an admin and stuff
Poison_Jay is offline
Send a message via MSN to Poison_Jay
Peli
Veteran Member
Join Date: Mar 2004
Location: San Diego, CA
Old 06-24-2004 , 19:49  
Reply With Quote #7

Quote:
Originally Posted by Poison_Jay
so if if it is enabled, everyround does everyone get shield and deagle?

and wat if i want it instant? do i just remove that whole line?
1. Yes every round if it is enabled it will give everyone a shield , deagle and full deagle ammo and it will say "ShieldWar is enabled".

2. What do you mean : "i mean like u need to be an admin and stuff" and : "and wat if i want it instant? do i just remove that whole line?".
Peli is offline
Send a message via MSN to Peli
kingpin
Veteran Member
Join Date: Apr 2004
Location: kpsforum.com
Old 06-24-2004 , 20:00  
Reply With Quote #8

he means so only admins can enable it. and no jay u dont remove the whole line u just change the #define which is set at 5.0 to 1.0 or something even smaller.
__________________
kingpin is offline
Send a message via ICQ to kingpin Send a message via AIM to kingpin Send a message via MSN to kingpin Send a message via Yahoo to kingpin Send a message via Skype™ to kingpin
Poison_Jay
Senior Member
Join Date: May 2004
Old 06-24-2004 , 22:55  
Reply With Quote #9

okay i try testing it out
Poison_Jay is offline
Send a message via MSN to Poison_Jay
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 14:47.


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