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

Speed (KRoTaL)


Post New Thread Reply   
 
Thread Tools Display Modes
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 11-08-2007 , 21:19   Re: Speed (KRoTaL)
Reply With Quote #21

Quote:
Originally Posted by `666 View Post
thanks man! here is ready compiled, in case if some one doesn't know how to compile offline...
FYI, the Get Plugin! link compiles it for you. You only really have to compile it locally if you edited the code AND/OR the plugin requires additional include files
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-09-2007 , 10:18   Re: Speed (KRoTaL)
Reply With Quote #22

In fact, the web compiler didn't work when he post it, i've added 1.7 support right after.
ConnorMcLeod is offline
`666
AlliedModders Donor
Join Date: Jan 2006
Old 11-09-2007 , 10:45   Re: Speed (KRoTaL)
Reply With Quote #23

Quote:
Originally Posted by connorr View Post
Added amxx1.7 support.
Corrected a little error(vehicle speed was shown even if player didn't enable /speed).
I can add cvars if you guys need some.
thanks again
`666 is online now
`666
AlliedModders Donor
Join Date: Jan 2006
Old 11-09-2007 , 15:05   Re: Speed (KRoTaL)
Reply With Quote #24

i get 100 choke with this version :S
`666 is online now
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-10-2007 , 07:02   Re: Speed (KRoTaL)
Reply With Quote #25

When you're on a vehicle or everytime ?

Try this and tell me if you still have choke :
PHP Code:
/*******************************************************************************
                            AMX Speed


  Author: KRoTaL
  Version: 0.2

  0.1    Release
  0.2    Dead players can see the speed of the player they are spectating


  Shows your current speed, max speed, max ground speed.
  You can also see players max ground speeds, to check if one has a speed hack.


  Commands:

  say /speed    -   switches the display of the speed info
  
  amx_showspeed   -   shows the max speed of connected players (admin only)


  Setup:

  Install the amx file.


*******************************************************************************/

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

#define MAX_PLAYERS    32

new bool:g_speed[MAX_PLAYERS+1]
new 
Float:g_maxGroundSpeed[MAX_PLAYERS+1]
new 
Float:g_maxSpeed[MAX_PLAYERS+1]
//new g_maxplayers
new g_sync_playerg_sync_vehicle

public plugin_init()
{
    
register_plugin("Speed""0.2""KRoTaL")
    
register_clcmd("say /speed""speedSwitch")
    
register_clcmd("say .speed""speedSwitch")
    
register_clcmd("say_team /speed""speedSwitch")
    
register_clcmd("say_team .speed""speedSwitch")
    
register_clcmd("amx_showspeed""showSpeed"ADMIN_LEVEL_B"- shows the max speed of connected players")
    
register_forward(FM_PlayerPreThink"fwdPlayerPreThink")
    
register_forward(FM_Touch"fwdTouch")
    
//g_maxplayers = global_get(glb_maxClients)

    
g_sync_player CreateHudSyncObj()
    
g_sync_vehicle CreateHudSyncObj()
}

public 
client_connect(id)
{
    
g_speed[id] = false
    g_maxSpeed
[id] = 0.0
    g_maxGroundSpeed
[id] = 0.0
}

public 
speedSwitch(id)
{
    if(!
g_speed[id])
        
g_speed[id] = true
    
else
        
g_speed[id] = false

    client_print
(idprint_chat"[AMX] You have %s speed info."g_speed[id] ? "enabled" "disabled")
    return 
PLUGIN_CONTINUE
}

public 
showSpeed(id,level,cid)
{
  if(!
cmd_access(id,level,cid,1))
    return 
PLUGIN_HANDLED
    
  
new msg[512], len
  len 
format(msg511"<body><pre>%-16.16s %s""Player Name""Max Ground Speed")
  new 
plname[16]
  new 
players[32], inumplayer
  get_players
(playersinum)
  for(new 
0inumi++)
  {
    
player players[i]
    if(
g_maxGroundSpeed[player])
    {
      
plname[0] = '^0'
      
get_user_name(playerplname15)
      
len += format(msg[len], 511-len"^n%-16.16s %.0f"plnameg_maxGroundSpeed[player])
    }
  }
  
show_motd(idmsg"Max Ground Speeds")
  return 
PLUGIN_HANDLED
}

public 
fwdPlayerPreThink(id)
{
    if(!
is_user_alive(id))
        return 
FMRES_IGNORED
    
if(!g_speed[id])
        return 
FMRES_IGNORED

    
static Float:velocity[3], Float:speed
    pev
(idpev_velocityvelocity)
    
speed vector_length(velocity)

    if(
speed g_maxSpeed[id])
        
g_maxSpeed[id] = speed
    
    
if(pev(idpev_flags) & FL_ONGROUND)
    {
        if(
speed g_maxGroundSpeed[id])
            
g_maxGroundSpeed[id] = speed
    
}

    static 
msg[128]
    
formatex(msgcharsmax(msg), "Current Speed: %3.0f  ^nMax Speed: %.0f  ^nMax Ground Speed: %.0f  ",
     
speedg_maxSpeed[id], g_maxGroundSpeed[id])
    
set_hudmessage(2552552552.00.401.00.130.10.2, -1)
    
ShowSyncHudMsg(idg_sync_playermsg)


/*    for(new j = 1; j <= g_maxplayers; j++)
    {
        if(!is_user_alive(j) && g_speed[j] && pev(j, pev_iuser2) == id)
        {
            ShowSyncHudMsg(j, g_sync_player, msg)
        }
    }*/
    
return FMRES_HANDLED
}

public 
fwdTouch(entid) {
    if(!
is_user_alive(id))
        return 
FMRES_IGNORED
    
if(!pev_valid(ent))
        return 
FMRES_IGNORED
    
if(!g_speed[id])
        return 
FMRES_IGNORED

    
static classname[33]
    
pev(entpev_classnameclassnamecharsmax(classname))
    if( 
strcmp(classname"func_vehicle") != && strcmp(classname"func_tracktrain") != 0)
        return 
FMRES_IGNORED

    
static Float:velocity[3], Float:speed
    pev
(entpev_velocityvelocity)
    
speed vector_length(velocity)

    static 
msg[32]
    
formatex(msgcharsmax(msg), "Vehicle Speed: %3.0f  "speed)
    
set_hudmessage(2552552552.00.3701.00.130.10.2, -1)
    
ShowSyncHudMsg(idg_sync_vehiclemsg)

/*    for(new j = 1; j <= g_maxplayers; j++)
    {
        if(!is_user_alive(j) && g_speed[j] && pev(j, pev_iuser2) == id)
        {
            ShowSyncHudMsg(j, g_sync_vehicle, msg)
        }
    }*/
    
return FMRES_HANDLED


Last edited by ConnorMcLeod; 11-10-2007 at 07:04.
ConnorMcLeod is offline
`666
AlliedModders Donor
Join Date: Jan 2006
Old 11-10-2007 , 11:27   Re: Speed (KRoTaL)
Reply With Quote #26

chokes when /speed is on and above one too, but the one posted by GraffityMaster doesn't.
`666 is online now
vittu
SuperHero Moderator
Join Date: Oct 2004
Location: L.A. County, CA
Old 11-10-2007 , 13:29   Re: Speed (KRoTaL)
Reply With Quote #27

yuck, don't put hud messages in prethinks unless you have some kind of time check so it's not spammed. Reason why you are giving him choke, original just does it every 0.1 seconds instead of every think. (same with touch)
vittu is offline
Send a message via AIM to vittu Send a message via MSN to vittu Send a message via Yahoo to vittu
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-11-2007 , 07:18   Re: Speed (KRoTaL)
Reply With Quote #28

Ok then, task is back.
Attached Files
File Type: sma Get Plugin or Get Source (speed.sma - 929 views - 4.1 KB)

Last edited by ConnorMcLeod; 11-11-2007 at 07:59.
ConnorMcLeod is offline
justin_76
Junior Member
Join Date: Nov 2007
Old 11-15-2007 , 07:58   Re: Speed (KRoTaL)
Reply With Quote #29

Hey,try this one,great plugin!

it's show your speed,jump distance and so on........

command

say /speed --- show your run speed
say /ljstats --- show your jump speed,distance.
Attached Images
File Type: bmp 123.bmp (39.7 KB, 236 views)
Attached Files
File Type: amxx kz_ljs_xm.amxx (105.5 KB, 212 views)
File Type: sma Get Plugin or Get Source (kz_ljs_xm.sma - 740 views - 111.6 KB)
justin_76 is offline
purple_pixie
Veteran Member
Join Date: Jun 2007
Location: Winchester, England
Old 11-15-2007 , 11:58   Re: Speed (KRoTaL)
Reply With Quote #30

If you want to check for hackers, would it not make more sense to check for distance travelled between frames?

And compare that to their speed?
purple_pixie 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 13:36.


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