Raised This Month: $ Target: $400
 0% 

Error with my 2 plugins


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
mugiwara
Junior Member
Join Date: Sep 2009
Old 10-09-2009 , 14:11   Error with my 2 plugins
Reply With Quote #1

Well i just read a tutorial of how to create a plugin

i made the code and that thinks from the tutorial i learned but i thinks there are errors with the codes i made. Can someone see if there any error?

This is the Health Code

Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

#define PLUGIN "givehealth"
#define VERSION "1.0"
#define AUTHOR "mugiwara"


public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
   register_clcmd("say /health", "medic")
   

set_user_health(id, 150)

client_print(id, print_chat,"You just purchased some medic packs, Dont Get Killd!")

}
     

new plugin_on
new price
 
public plugin_init() 
 
{register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /heath", "medic")
 
 plugin_on = register_cvar("amx_givehealth_plugin", "1")
price = register_cvar("amx_givehealth_price", "4000")

}
 
public medic(id)
{
	
	new money = cs_get_user_money(id)
	if (get_pcvar_num(plugin_on) == 1)
 
}

 {
 
  set_user_health(id, 150)
  
  client_print(id, print_chat,"You just purchased some medic packs, Dont Get Killd!"")
 }
 
   else
 {
  client_print(id, print_chat,"Not enough money. Go work out, loser!")
 }
 
 {
  cs_set_user_money(id, money - get_pcvar_num(price))
 }
This is the Armor Code

Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

#define PLUGIN "givearmor"
#define VERSION "1.0"
#define AUTHOR "mugiwara"


public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
   register_clcmd("say /armor", "armor")
   

set_user_health(id, 150)

client_print(id, print_chat,"You just purchased some armor, AntiShotGuy!!!")

}
     

new plugin_on
new price
 
public plugin_init() 
 
{register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /armor", "armor")
 
 plugin_on = register_cvar("amx_givearmor_plugin", "1")
price = register_cvar("amx_givearmor_price", "4000")

}
 
public armor(id)
{
	
	new money = cs_get_user_money(id)
	if (get_pcvar_num(plugin_on) == 1)
 
}

 {
 
  set_user_armor(id, 100)
  
  client_print(id, print_chat,"You just purchased some armor, AntiShotGuy!!!"")
 }
 
   else
 {
  client_print(id, print_chat,"Not enough money. Go work out, loser!")
 }
 
 {
  cs_set_user_money(id, money - get_pcvar_num(price))
 }
if theres any error with it plzz reply
mugiwara is offline
 


Thread Tools
Display Modes

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 22:34.


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