Raised This Month: $ Target: $400
 0% 

Speed???


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dizzy
Veteran Member
Join Date: Jun 2004
Location: Massachusetts
Old 02-23-2006 , 16:01   Speed???
Reply With Quote #1

Hey, I was making a plugin and I can't get a player to have more speed...

When they type the clcmd he can't move unless he changes weapons and after that he doesn't go faster...

Normal speed is this:
Code:
set_user_maxspeed(id, -1.0)

How would you make it got faster???

-2.0???

Thanks in advance
__________________
My Plugins

Purchase Mod - Stable
Type Sounds - Stable
Monster Spawner - Stable
Nade Giver - Maintenance
Dizzy is offline
Send a message via AIM to Dizzy
pixel3
Senior Member
Join Date: Dec 2005
Old 02-23-2006 , 16:19  
Reply With Quote #2

Code:
set_user_maxspeed(id, 500)

This would make player move faster. And also -1.0 is not the normal speed. I'm not sure what normal speed is. 320 maybe. And if you want the person to keep the speed if weapon is changed then you need hook CurWeapon event.
__________________
pixel3 is offline
Petey B
Member
Join Date: Feb 2005
Old 02-23-2006 , 16:19  
Reply With Quote #3

do a set_user_maxspeed(id, 1000) in a current weapon event so when he changes it will stay.

and set sv_maxspeed to 9999999


Edit: Damn posted at the same time
Petey B is offline
Send a message via MSN to Petey B
Sandurr
Senior Member
Join Date: Aug 2005
Old 02-23-2006 , 16:20  
Reply With Quote #4

default is 320.0

If you want to be faster you must set sv_maxspeed in your server.cfg

like

sv_maxspeed 1000

then you can set set_user_maxspeed(id,1000.0)
Sandurr is offline
Petey B
Member
Join Date: Feb 2005
Old 02-23-2006 , 16:23  
Reply With Quote #5

i think the normal speed is 250
Petey B is offline
Send a message via MSN to Petey B
pixel3
Senior Member
Join Date: Dec 2005
Old 02-23-2006 , 16:23  
Reply With Quote #6

Hmm.. I belive you dont have to do sv_maxspeed 9999 or whatever. Doesnt this change the speed of all players? I'm not using sv_maxspeed in my plugin but set_user_maxspeed seems to work fine.
__________________
pixel3 is offline
Dizzy
Veteran Member
Join Date: Jun 2004
Location: Massachusetts
Old 02-23-2006 , 17:21  
Reply With Quote #7

This kinda works...

Code:
public speed(id) {     new money = cs_get_user_money(id);     new cost = 10000;     if(get_cvar_num("amx_pmod")== 0 || powerpur[id] == 0 || powerpurs[id] == 0 || money - cost < 0)     {         client_print(0, print_chat, "[Purchase Mod]: You already purchased an ability, don't have enough money, or the plugin is off!")         return PLUGIN_HANDLED     }     else if(get_cvar_num("amx_pmod")== 1 && powerpur[id] == 1 && powerpurs[id] == 1)     {     set_user_maxspeed(id, get_user_maxspeed(id) + 680)     powerpurs[id] = 0     powerpur[id] = 0     client_print(0, print_chat, "[Purchase Mod]: You purchased speed for $10,000!")     cs_set_user_money(id , money - cost , 1);     return PLUGIN_HANDLED     } return PLUGIN_HANDLED }

But when you switch weapons it changes... How do you do the Currweapon?

I want to make it so when they say "buyspeed" it gives them speed +680
__________________
My Plugins

Purchase Mod - Stable
Type Sounds - Stable
Monster Spawner - Stable
Nade Giver - Maintenance
Dizzy is offline
Send a message via AIM to Dizzy
Dizzy
Veteran Member
Join Date: Jun 2004
Location: Massachusetts
Old 02-23-2006 , 18:06  
Reply With Quote #8

I'm going to continue this here...

http://forums.alliedmods.net/showthread.php?t=24439
__________________
My Plugins

Purchase Mod - Stable
Type Sounds - Stable
Monster Spawner - Stable
Nade Giver - Maintenance
Dizzy is offline
Send a message via AIM to Dizzy
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 02-23-2006 , 18:33  
Reply With Quote #9

What I do:
Code:
new Float:speed = get_user_maxspeed(id) + 75.0; set_user_maxspeed(id , speed);
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x 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 10:21.


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