Raised This Month: $ Target: $400
 0% 

script help.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
n0obie4life
Veteran Member
Join Date: Dec 2004
Old 02-03-2005 , 07:59   script help.
Reply With Quote #1

Code:
#include <amxmodx> #include <amxmisc> #include <fun> #define TEAM_T 1 #define TEAM_CT 2 public round_start(id) {    switch(get_user_team(id)) {       case TEAM_T: if (get_cvar_num("c4_t")) give_item(id,"weapon_c4")       case TEAM_CT: if (get_cvar_num("c4_ct")) give_item(id,"weapon_c4") }    return PLUGIN_CONTINUE }   public plugin_init() { #define PLUGIN_NAME "C4 Madness" #define PLUGIN_VERSION "0.1" #define PLUGIN_AUTHOR "n0obie4life"    register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR) }    register_cvar("c4_t","1")    register_cvar("c4_ct","0")    register_event("ResetHUD", "round_start", "b") }

this is my script. i'm trying to port it and modify it. but now i'm having a problem.
Quote:
C:\Valve\Steam\SteamApps\n0obie4life\counter-strike\cstrike\addons\amxmodx\sc
ripting\c4_modes.sma(31) : error 021: symbol already defined: "register_cvar"
that is the error i'm getting. help please?
n0obie4life is offline
Damocles
Member
Join Date: Jan 2005
Old 02-03-2005 , 08:34  
Reply With Quote #2

hmmm do u know how to code ? me thinks not

try removing the erroneous '}' in your code....and indent things nicely....the code compiles, not sure if its going to do what your after tho...

Code:
#include <amxmodx> #include <amxmisc> #include <fun> #define TEAM_T 1 #define TEAM_CT 2 #define PLUGIN_NAME "C4 Madness" #define PLUGIN_VERSION "0.1" #define PLUGIN_AUTHOR "n0obie4life" public round_start(id) {       switch(get_user_team(id))     {         case TEAM_T: if (get_cvar_num("c4_t")) give_item(id,"weapon_c4")         case TEAM_CT: if (get_cvar_num("c4_ct")) give_item(id,"weapon_c4")     }     return PLUGIN_CONTINUE }   public plugin_init() {    register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)    register_cvar("c4_t","1")    register_cvar("c4_ct","0")    register_event("ResetHUD", "round_start", "b") }
Damocles is offline
n0obie4life
Veteran Member
Join Date: Dec 2004
Old 02-03-2005 , 09:01  
Reply With Quote #3

nope nope, me dunno how to code, total n00b.
n0obie4life is offline
Damocles
Member
Join Date: Jan 2005
Old 02-03-2005 , 09:06  
Reply With Quote #4

lol if you want to code some simple scripts why dont u read the stickys on good programming and the good stuff that was written about learning Small.

Would be much better for ya ;)
Damocles is offline
n0obie4life
Veteran Member
Join Date: Dec 2004
Old 02-05-2005 , 01:14  
Reply With Quote #5

err okay ..

but the plugin doesn't work the way i want it. look at the error?
n0obie4life is offline
BlueRaja
Senior Member
Join Date: Nov 2004
Old 02-05-2005 , 01:24  
Reply With Quote #6

What error might that be?

Damocles already told you how to fix the error in your original post...
BlueRaja is offline
Send a message via AIM to BlueRaja Send a message via MSN to BlueRaja
n0obie4life
Veteran Member
Join Date: Dec 2004
Old 02-05-2005 , 03:46  
Reply With Quote #7

i was told its some sort of cvar error...and besides what he gave me doesn't work .
n0obie4life 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 19:16.


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