Raised This Month: $ Target: $400
 0% 

Help.. Speed


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
fireattack
Senior Member
Join Date: Jul 2008
Old 08-15-2010 , 16:43   Re: Help.. Speed
Reply With Quote #9

I'm bored, so i'm gonna make the plugin for you.
Edit in 5 minutes

EDIT: Sorry, i was withouth internet.
Here you go

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <engine>
#include <fakemeta>
#include <fun>
 
new t_player_class[33]
 
// Init
public plugin_init() 
{
 
register_plugin("HnSShop""0.1""extr")
 
register_clcmd("say /shop""shop")
 
register_event("CurWeapon""curweapon""be""1=1")
}
 
// Let's create the menu!
public shop(id)
{
 if(
is_user_alive(id) || is_user_connected(id)) 
 {
  new 
menu menu_create("\rHnS Shop:""shop1")
  
menu_additem(menu"HOLYSHITSPEED FOR 1000$!!!""1"0)
  
menu_setprop(menuMPROP_EXITMEXIT_ALL)
  
menu_display(idmenu0)
 }
}
 
// Skills
public shop1(idmenuitem)
{
 if( 
item == MENU_EXIT )
 {
  
menu_destroy(menu)
  return 
PLUGIN_HANDLED
 
}
 new 
data[6], iName[64]
 new 
accesscallback
 menu_item_getinfo
(menuitemaccessdata,5iName63callback)
 new 
key str_to_num(data)
 switch(
key)
 {
  case 
:
  {
  if (
cs_get_user_money(id) < 1000)
  {
  
client_print(idprint_chat"^4[Shop]^3 You havent money!");
  return 
PLUGIN_HANDLED;
  }
  if (!
is_user_alive(id))
  {
  
client_print(idprint_chat"^4[Shop]^3 You have to be alive!");
  return 
PLUGIN_HANDLED;
  }
  if (
cs_get_user_money(id) >= 1000 )
  {
   
client_print(idprint_chat"^4[Shop]^3 BOUGHT!!!!")
   
t_player_class[id] = // Set the id to the curweapon
 
   
if(is_user_connected(id))
   {
    
set_user_maxspeed(id800.0// Set the speed
   
}
   
cs_set_user_money(id cs_get_user_money(id) - 10000// Money
  
}
 }
  }
 
menu_destroy(menu)
 return 
PLUGIN_HANDLED
}
 
// The event
public curweapon(id// I think you can understand this, its for the event "curweapon"
{
 if(
t_player_class[id])
 {
  switch(
t_player_class[id])
  {
   case 
1:
   { 
    
set_user_maxspeed(id800.0)
   }
  }
 }


Last edited by fireattack; 08-16-2010 at 13:33.
fireattack 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 21:51.


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