Raised This Month: $ Target: $400
 0% 

first "plugin", scripting errors?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
KingCommentor
Senior Member
Join Date: Jan 2008
Location: Floridaaaa
Old 07-28-2008 , 21:35   Re: first "plugin", scripting errors?
Reply With Quote #3

What is the difference from what I had to what you suggested?

Well with the addition from above the plugin compiles and works .. sort of.

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>
 
#define PLUGIN "TESTING"
#define VERSION "1.0"
#define AUTHOR "kingcommentor"
 
new price
new enabled
new g_MsgSync
 
public plugin_init() 
{
 
register_plugin(PLUGINVERSIONAUTHOR)
 
register_clcmd("say /grav","testing")
 
price register_cvar("amx_grav_price""1000")
 
enabled register_cvar("amx_grav_enabled""1")
 
g_MsgSync CreateHudSyncObj()
}
public 
testing(id)

 new 
money cs_get_user_money(id)
 if (
get_pcvar_num(enabled) == 1)
 {
  if (
money 1000)
  {
   
client_print(id,print_chat,"You don't have enough money!")
  }
  else
  {
   
set_hudmessage(01272550.300.2906.0,15.0)
   
ShowSyncHudMsg(idg_MsgSync,"Your gravity is now 400")
   
set_pev(idpev_gravity0.50)
   
cs_set_user_money(idmoney-price)
  }
 }

When ingame and I type /grav I DO get 400 gravity like its suppose to, the HUD does appear BUT inseatd of just taking away the $1000 cost ..it minuses like 1.8Million.
What causes this ?
---
Also how can I make it so when you buy /grav you keep it until you die?
Also could you tell me what the code is to keep it forever/until map change?

ALSO just found out none of my cvars work .. ?

Last edited by KingCommentor; 07-28-2008 at 22:22.
KingCommentor is offline
Send a message via AIM to KingCommentor
 



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 05:31.


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