AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Re: Fix this plugin...Please <3 (https://forums.alliedmods.net/showthread.php?t=13796)

3xr 05-29-2005 18:14

Re: Fix this plugin...Please <3
 
Code:

#include <amxmodx>
#include <amxmisc>

new infmoney = 1

public plugin_init() {
  register_plugin("Infinite Money","1.0","")
  register_event("Money","money","b")
  register_concmd("amx_money","cmdmoney",1,"1 = on 0 = off")
}

public cmdmoney(id){
  new arg[2]
  read_argv(1,arg,1)
  set_hudmessage(255, 000, 128, -1.0, 0.25, 0, 1.0, 5.0, 0.1, 0.2, 2)
  if(equal(arg,"1")){
  infmoney = 1
  set_user_money(id,16000,1)
  show_hudmessage(0,"Admin has turned on infinite money.")
  }else if (equal(arg,"0")){
  infmoney = 0
  show_hudmessage(0,"Admin has turned off infinite money.")
  }

  return PLUGIN_CONTINUE
}

public money(id){
if(infmoney==0)
return PLUGIN_HANDLED
set_user_money(id,16000,1)
return PLUGIN_CONTINUE
}

I don't know shit about programing for SMA or anything.
I found this on the forum, but it won't compile, I don't know how amx x works and how it sets money, so the set_user_money is fucked, be nice if someone would fix. :wink:

f1del1ty.oXi 05-29-2005 20:03

Why didn't you just post this in the plugin topic and ask for help there? Your just wasting space and time. =\

3xr 05-30-2005 01:35

And your doing the same, by posting, and not helping. :shock:

v3x 05-30-2005 01:46

What's not working?

3xr 05-30-2005 07:39

I get an error...when I compile set_user_money.

v3x 05-30-2005 12:43

First of all, you need the Cstrike module.. Then try this:
Code:
#include <amxmodx> #include <cstrike> new infmoney = 1 public plugin_init() {     register_plugin("Infinite Money","1.0","")     register_event("Money","money","b")     register_concmd("amx_money","cmdmoney",1,"1 = on 0 = off") } public cmdmoney(id){     new arg[2]     read_argv(1,arg,1)     set_hudmessage(255, 000, 128, -1.0, 0.25, 0, 1.0, 5.0, 0.1, 0.2, 2)     if(equal(arg,"1")){         infmoney = 1         cs_set_user_money(id,16000,1)         show_hudmessage(0,"Admin has turned on infinite money.")         }else if (equal(arg,"0")){         infmoney = 0         show_hudmessage(0,"Admin has turned off infinite money.")     }         return PLUGIN_CONTINUE } public money(id){     if(infmoney==0)         return PLUGIN_HANDLED     cs_set_user_money(id,16000,1)     return PLUGIN_CONTINUE }


All times are GMT -4. The time now is 16:49.

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