Raised This Month: $ Target: $400
 0% 

[REQ] Show My Money


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ShLuMieL
Senior Member
Join Date: Jul 2010
Old 12-29-2011 , 13:12   [REQ] Show My Money
Reply With Quote #1

Hey for all
i have some problem in this code
i tried to put in my menu that it will show my my money
and its didn't show
code:
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fun>
#define PLUGIN "Ammo"
#define VERSION "1.0"
#define AUTHOR "Asaf Mazon"
new g_AlreadyStealth[33]; 
public 
plugin_init()
{    
 
register_plugin(PLUGINVERSIONAUTHOR)    
 
 
register_clcmd("say /ammo""ammo");
 
 
register_event("HLTV""event_round_start""a""1=0""2=0")
}
public 
event_round_startid )
{
 
g_AlreadyStealth[id] = 0;
}
public 
ammo(id)
{
 new 
menu menu_create("Stealth^n\wShot My Money: \r%d\y$""ammo3"cs_get_user_money(id));
 
menu_additem(menu"\wStealth""1"0);
 
menu_setprop(menuMPROP_EXITMEXIT_ALL);
 
 
menu_display(idmenu0);
 return 
PLUGIN_HANDLED;
}
public 
ammo3(idmenuitem)
{
 if(
item == MENU_EXIT)
 {
  
menu_destroy(menu);
  return 
PLUGIN_HANDLED;
 }
 
 new 
data[6], szName[64];
 new 
accesscallback;
 
menu_item_getinfo(menuitemaccessdata,5szName,63callback);
 
 new 
key str_to_num(data);
 
 switch(
key)
 {
  case 
1:
  {
   if(
g_AlreadyStealth[id]  == 1
   {
    
ColorChat(idNORMAL"%s You already bought^x04 Stealth^x01 in this round."TAG);
    return 
PLUGIN_HANDLED;
   }
   
   
g_AlreadyStealth[id] = 1;
   
set_user_rendering(idkRenderFxNone000kRenderTransAlpha7)
   
set_task(15.0"REMOVE")
   
ColorChat(idNORMAL"%s You have bought^x04 Flashbang."TAG);
  }
 }
 
menu_destroy(menu);
 return 
PLUGIN_HANDLED;
}
public 
REMOVE(id)
{
 
set_user_rendering(idkRenderFxNone000kRenderTransAlpha250)

if someone can tell me how to fix it and that will show my money
that it
Thank's
ShLuMieL is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 12-29-2011 , 13:16   Re: [REQ] Show My Money
Reply With Quote #2

Code:
new szItem[ 1024 ] formatex( szItem , charsmax( szItem ) , "Stealth^n\wShot My Money: \r%d\y$" , cs_get_user_money( id ) ) new menu = menu_create( szItem , "ammo3" )


Btw :

set_task(15.0, "REMOVE")

->

set_task(15.0, "REMOVE", id)
__________________
You can do anything you set your mind to, man.


Last edited by Devil259; 12-29-2011 at 13:35.
Devil259 is offline
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 08:01.


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