Raised This Month: $12 Target: $400
 3% 

Help whit 2 warnings please!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AlejandroSk
BANNED
Join Date: Nov 2008
Location: Aqui, en mi casa. Karma:
Old 02-03-2009 , 20:26   Help whit 2 warnings please!
Reply With Quote #1

hi =) need you help.
My extra item for zombie plague compile , but have 2 warnings =(
Can you help me to fix that?
And if you want , Help me to add a cvar to define total grav.
when i do this:
server_cmd("sv_gravity (get_pcvar_num(cvar_totalgrav))" it gives me errors
please fix my code =)

Warnings:
Loose identation , tag mismatch

Code:
 
#include <amxmodx>
#include <zombieplague>
#define PLUGIN "Start Whit Gravity"
#define VERSION "0.1" 
#define AUTHOR "AlejandroSk"
#define TOTAL_GRAV "300"
new cvar_time, cvar_toggle, cvar_message
public plugin_init(){
 register_plugin(PLUGIN, VERSION, AUTHOR)
 
 cvar_time = register_cvar("zp_grav_delay", "15")
 cvar_toggle = register_cvar("zp_grav_toggle", "1")
 cvar_message = register_cvar("zp_grav_msg", "1")
   register_logevent("EventRoundStart", 2, "1=Round_Start");
}
public EventRoundStart(id)
{
 if (get_pcvar_num(cvar_toggle))
 { 
  server_cmd("sv_gravity TOTAL_GRAV")
  set_task((get_pcvar_num(cvar_time)),"sacargrav",id)
  }
 else if (get_pcvar_num(cvar_message))
  {
 set_hudmessage(255, 0, 0, -1.0, 0.01)
 show_hudmessage(id, "God gives you some seconds of gravity!")
 }
 
}

public sacargrav(id)
{
 server_cmd("sv_gravity 800")
 if (get_pcvar_num(cvar_message))
 {
 set_hudmessage(255, 0, 0, -1.0, 0.01)
 show_hudmessage(id, "Your gravity has ended.")
 }
 
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang13322\\ f0\\ fs16 \n\\ par }
*/
AlejandroSk is offline
Send a message via MSN to AlejandroSk
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-03-2009 , 20:28   Re: Help whit 2 warnings please!
Reply With Quote #2

Code:
 
#include <amxmodx>
#include <zombieplague>
#define PLUGIN "Start Whit Gravity"
#define VERSION "0.1" 
#define AUTHOR "AlejandroSk"
#define TOTAL_GRAV "300"
new cvar_time, cvar_toggle, cvar_message
public plugin_init(){
 register_plugin(PLUGIN, VERSION, AUTHOR)
 
 cvar_time = register_cvar("zp_grav_delay", "15")
 cvar_toggle = register_cvar("zp_grav_toggle", "1")
 cvar_message = register_cvar("zp_grav_msg", "1")
 register_logevent("EventRoundStart", 2, "1=Round_Start");
}
public EventRoundStart(id)
{
 if (get_pcvar_num(cvar_toggle))
 { 
  server_cmd("sv_gravity %i", TOTAL_GRAV)
  set_task(get_pcvar_float(cvar_time),"sacargrav",id)
 }
 if (get_pcvar_num(cvar_message))
 {
  set_hudmessage(255, 0, 0, -1.0, 0.01)
  show_hudmessage(id, "God gives you some seconds of gravity!")
 }
}

public sacargrav(id)
{
 server_cmd("sv_gravity 800")
 if (get_pcvar_num(cvar_message))
 {
  set_hudmessage(255, 0, 0, -1.0, 0.01)
  show_hudmessage(id, "Your gravity has ended.")
 }
 
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang13322\\ f0\\ fs16 \n\\ par }
*/
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
AlejandroSk
BANNED
Join Date: Nov 2008
Location: Aqui, en mi casa. Karma:
Old 02-03-2009 , 20:33   Re: Help whit 2 warnings please!
Reply With Quote #3

thank you so much
EDIT: last question, how can i add a cvar for total grav?
EDIT : ADDED =D thanks you so much again

Last edited by AlejandroSk; 02-03-2009 at 20:40.
AlejandroSk is offline
Send a message via MSN to AlejandroSk
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 15:13.


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