Raised This Month: $ Target: $400
 0% 

fix this plz


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
maariak
Junior Member
Join Date: Dec 2004
Old 02-08-2005 , 19:22   fix this plz
Reply With Quote #1

hey. i tryed to make a plugin for amxx. when i compile i get some errors. can some1 fix this??
Code:
/* Superhero and Reg CS By Lil' P!mP. Made for -=[NaW]=- Clan server @ jpr2.nuclearfallout.net */ include <amxmodx> public plugin_init() {     register_clcmd("say /voteshero","shero", 0, " - Starts a vote for Super Hero Mod")     register_clcmd("say /votereg","reg", 0, " - Starts a vore for Regular CS")     register_cvar("amx_shreg","1")     register_plugin("SHero/Reg CS", "v0.1", "Lil' P!mP") return PLUGIN_CONTINUE } public reg(id) {     new shreg = get_cvar_num(amx_shreg)     {     if (shreg=0){     client_print(id, print_chat, "[AMXX] Voting not allowed at this time")     return PLUGIN_HANDLED     }     else{     set_cvar_num(sv_superheros, 0)     client_print(0, print_chat, "[AMXX] The server had been changed to Regular CS!")     set_cvar_num(sv_restartround, 1)     return PLUGIN_HANDLED     } } public shero {     new shreg = get_cvar_num(amx_shreg)     {     if (shreg=0){     client_print(id, print_chat, "[AMXX] Voting not allowed at this time")     return PLUGIN_HANDLED     }     else{     set_cvar_num(sv_superheros, 1)     client_print(0, print_chat, "[AMXX] The server had been changed to SuperHero Mod!!")     set_cvar_num(sv_restartround, 1)     return PLUGIN_HANDLED     } }
maariak is offline
Crazywelder1
Member
Join Date: Mar 2004
Location: CA
Old 02-08-2005 , 19:34  
Reply With Quote #2

Code:
#include <amxmodx>

one problem is that u forgot this # infront of include <amxmodx>
Crazywelder1 is offline
Send a message via MSN to Crazywelder1
maariak
Junior Member
Join Date: Dec 2004
Old 02-08-2005 , 19:39  
Reply With Quote #3

thx. i forgot about that. and i had 1 more prob with 2 bracets but i fixed it. thx for ur help
maariak is offline
Peli
Veteran Member
Join Date: Mar 2004
Location: San Diego, CA
Old 02-08-2005 , 19:44  
Reply With Quote #4

Maarik next time supply the errors and let us know a little about the plugin.
Peli is offline
Send a message via MSN to Peli
xeroblood
BANNED
Join Date: Mar 2004
Location: Toronto, Canada
Old 02-08-2005 , 21:34  
Reply With Quote #5

new shreg = get_cvar_num(amx_shreg)
if (shreg=0){

Should Be:

new shreg = get_cvar_num("amx_shreg")
if (shreg==0){


Also,

set_cvar_num(sv_superheros, 0)

Should be:

set_cvar_num("sv_superheros", 0)

And,

public shero

Should be:

public shero(id)


And you have too many Curly-Brackets (proper indenting will help you avoid that), revised version (not tested):

Code:
/* Superhero and Reg CS By Lil' P!mP. Made for -=[NaW]=- Clan server @ jpr2.nuclearfallout.net */ include <amxmodx> public plugin_init() {     register_clcmd("say /voteshero","shero", 0, " - Starts a vote for Super Hero Mod")     register_clcmd("say /votereg","reg", 0, " - Starts a vore for Regular CS")     register_cvar("amx_shreg","1")     register_plugin("SHero/Reg CS", "v0.1", "Lil' P!mP")     return PLUGIN_CONTINUE } public reg(id) {     new shreg = get_cvar_num("amx_shreg")         if (shreg==0){         client_print(id, print_chat, "[AMXX] Voting not allowed at this time")     }     else{         set_cvar_num("sv_superheros", 0)         client_print(0, print_chat, "[AMXX] The server had been changed to Regular CS!")         set_cvar_num('sv_restartround", 1)     }     return PLUGIN_HANDLED } public shero(id) {     new shreg = get_cvar_num("amx_shreg")         if (shreg==0){         client_print(id, print_chat, "[AMXX] Voting not allowed at this time")     }     else{         set_cvar_num("sv_superheros", 1)         client_print(0, print_chat, "[AMXX] The server had been changed to SuperHero Mod!!")         set_cvar_num("sv_restartround", 1)     }     return PLUGIN_HANDLED }

I hope that helps!
xeroblood is offline
Send a message via MSN to xeroblood
Peli
Veteran Member
Join Date: Mar 2004
Location: San Diego, CA
Old 02-08-2005 , 21:41  
Reply With Quote #6

Off-Topic but , whatsup Xero , nice too see you back.
Peli is offline
Send a message via MSN to Peli
xeroblood
BANNED
Join Date: Mar 2004
Location: Toronto, Canada
Old 02-08-2005 , 21:58  
Reply With Quote #7

Sup Peli, Thx! I've just been busy with work, but I am still around!!

AMX & AMXX on CS = PWNAGE, so I will never really leave, I just may be absent from time to time

I'm sure you know what I mean
xeroblood is offline
Send a message via MSN to xeroblood
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:18.


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