AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Speed??? (https://forums.alliedmods.net/showthread.php?t=24456)

Dizzy 02-23-2006 16:01

Speed???
 
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

pixel3 02-23-2006 16:19

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.

Petey B 02-23-2006 16:19

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 :lol:

Sandurr 02-23-2006 16:20

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)

Petey B 02-23-2006 16:23

i think the normal speed is 250

pixel3 02-23-2006 16:23

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.

Dizzy 02-23-2006 17:21

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

Dizzy 02-23-2006 18:06

I'm going to continue this here...

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

v3x 02-23-2006 18:33

What I do:
Code:
new Float:speed = get_user_maxspeed(id) + 75.0; set_user_maxspeed(id , speed);


All times are GMT -4. The time now is 20:25.

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