Raised This Month: $51 Target: $400
 12% 

Player Speed


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DarkMind
Member
Join Date: Aug 2003
Old 01-01-2005 , 05:21   Player Speed
Reply With Quote #1

Sorry for a slow update. I was called out of town on business.

CVar (used in amxx.cfg)
amx_speed (default = 325.0)

Code:
// =======================================================
// Player Max Speed
// by DarkMind
// Original Code by {HOJ} Batman
// =======================================================

new const PLUGIN[] = "amx_speed"
new const VERSION[] = "0.4"
new const AUTHOR[] = "DarkMind"
new gCurrentWeapon[33]
new wtf[33]

#include <amxmod>
#include <amxmisc>

// =======================================================
// Plugin Information
// =======================================================

public plugin_init() {
	register_plugin(PLUGIN,VERSION,AUTHOR)
	register_cvar(PLUGIN,VERSION,FCVAR_SERVER|FCVAR_SPONLY)
	register_cvar("amx_speed","325.0")
	register_event("CurWeapon","weapon_switch","be","1=1")
	register_logevent("round_start",2,"0=World triggered","1=Round_Start")
	return PLUGIN_CONTINUE
}

// =======================================================
// 'Weapon Switch'
// =======================================================

public weapon_switch(id) {
	new Float:maxSpeed = get_cvar_float("amx_speed")
	new weaponid = read_data(2)
	if(gCurrentWeapon[id] != weaponid) {
		gCurrentWeapon[id] = weaponid
		set_user_maxspeed(id,maxSpeed)
	}
}

// =======================================================
// 'Round Start'
// =======================================================

public round_start(id) {
	new Float:maxSpeed = get_cvar_float("amx_speed")
	new maxplayers = get_maxplayers()+1
	for (new a=1; a<maxplayers; a++){
		if(wtf[a] == 1){
		set_user_rendering(a,kRenderFxNone,255,255,255,kRenderNormal,16)
		wtf[a] = 0
		}
		set_user_maxspeed(id,maxSpeed)
	}
	return PLUGIN_CONTINUE
}
Note!
You must set a float value in your AMXX.cfg file.
i.e. 325.0 or 400.0

This code has been taken from SuperHero Mod. It has been slightly modified but heavily trimmed for the purposes of running speed only. The true credit should be given to the SH Mod developers:
{HOJ} Batman
JTP10181
ASSKICR
Attached Files
File Type: amx amx_speed.amx (2.3 KB, 373 views)
__________________
BL Clan Server
IP = 66.208.107.35:27015
DarkMind is offline
FsC | BeTa
New Member
Join Date: Jan 2005
Location: scotland
Old 01-05-2005 , 05:07  
Reply With Quote #2

ahhhhh this is the one i need, i still havent worked out how to activate it though? Do i have to write anything into the console?
FsC | BeTa is offline
DarkMind
Member
Join Date: Aug 2003
Old 01-10-2005 , 03:18  
Reply With Quote #3

Updated. Please peruse first post.

Also, please inform me if you find any bugs or ntice any glitches and I will update as best I can. Thanks.
__________________
BL Clan Server
IP = 66.208.107.35:27015
DarkMind 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:53.


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