AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   HOw to make for the team? (https://forums.alliedmods.net/showthread.php?t=3021)

Poison_Jay 06-24-2004 02:21

HOw to make for the team?
 
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?

Peli 06-24-2004 02:29

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. :)

Poison_Jay 06-24-2004 02:48

okay. that will be great

Peli 06-24-2004 03:02

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 }

Poison_Jay 06-24-2004 04:23

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 06-24-2004 08:20

i mean like u need to be an admin and stuff

Peli 06-24-2004 19:49

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?".

kingpin 06-24-2004 20:00

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.

Poison_Jay 06-24-2004 22:55

okay i try testing it out


All times are GMT -4. The time now is 14:47.

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