Raised This Month: $ Target: $400
 0% 

Help.. Speed


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
EpicFail.
Senior Member
Join Date: May 2010
Old 08-13-2010 , 08:21   Help.. Speed
Reply With Quote #1

Hmm.. i make a Hns Shop and when i buy Faster Speed
and Change weapon this remove the speed ..

How i can fix this
EpicFail. is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 08-13-2010 , 08:25   Re: Help.. Speed
Reply With Quote #2

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

new Floatspeed 400.0;

public 
plugin_init()
    
register_event("CurWeapon""Event_CurWeapon""be");
    
public 
Event_CurWeapon(id)
{
    if(
is_user_alive(id))
        
set_user_maxspeed(idspeed);

__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
EpicFail.
Senior Member
Join Date: May 2010
Old 08-13-2010 , 08:32   Re: Help.. Speed
Reply With Quote #3

this code give auto speed for how connect to server ..
EpicFail. is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 08-13-2010 , 08:39   Re: Help.. Speed
Reply With Quote #4

Well, you have to integrate it in your code.
It's just an example
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
EpicFail.
Senior Member
Join Date: May 2010
Old 08-13-2010 , 08:46   Re: Help.. Speed
Reply With Quote #5

Quote:
Originally Posted by drekes View Post
Well, you have to integrate it in your code.
It's just an example
if i give you my code you can do this for me ?
EpicFail. is offline
EpicFail.
Senior Member
Join Date: May 2010
Old 08-13-2010 , 09:18   Re: Help.. Speed
Reply With Quote #6

Okay i get this .. (i make one for me)
now how i can make Remove Task for this .. ?
EpicFail. is offline
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 08-13-2010 , 09:39   Re: Help.. Speed
Reply With Quote #7

Use a boolean and set_task() to the amount of time you want it to last, then in the task function you set the boolean to false and reset maxspeed.
__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
EpicFail.
Senior Member
Join Date: May 2010
Old 08-13-2010 , 10:19   Re: Help.. Speed
Reply With Quote #8

@DarkGod
i do this and this wont work ..

can you make one for me or something
EpicFail. is offline
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
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 08-15-2010 , 19:14   Re: Help.. Speed
Reply With Quote #10

Quote:
Originally Posted by fireattack View Post
I'm bored, so i'm gonna make the plugin for you.
Edit in 5 minutes
It's been two hours
__________________
Hunter-Digital is offline
Reply


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 21:51.


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