Raised This Month: $ Target: $400
 0% 

Gravity buy


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Compro
Junior Member
Join Date: Nov 2011
Old 11-21-2011 , 13:40   Gravity buy
Reply With Quote #1

Hi , i made code , who will allow to buy a gravity, compiles without errors and warnings, but in server when i type /gv, the gravity dont reduces. Where is a mistake in my code ?

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>

#define PLUGIN "TEST"
#define VERSION "1.0"
#define AUTHOR "TEST"


public plugin_init() {
register_plugin(PLUGINVERSIONAUTHOR)
register_clcmd("say /gv","cmd_gravity")

}
public 
cmd_gravity(id)
{
if(!
is_user_alive(id))
{
  
client_print(id,print_chat,"Dead players can't buy!")
}
else if(
cs_get_user_money(id)<10000)
{
  
client_print(id,print_chat,"You dont have enough money!")
}
else
{
  
cs_set_user_money(id,cs_get_user_money(id) - 10000)
  
set_user_gravity(id,0.5)
}
return 
PLUGIN_HANDLED


Last edited by Compro; 11-21-2011 at 13:41.
Compro is offline
 



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 08:25.


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