Raised This Month: $ Target: $400
 0% 

Big Request


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
rikards1
Member
Join Date: Aug 2009
Old 12-22-2009 , 07:37   Big Request
Reply With Quote #1

Hello, I´m comming with a pretty big request for a plugin, a jump plugin.
The plugin should count every bhop and crouched bhop the player does and it should pop up to the left like this:


Jumps:
15102 (and counting on when jumping like, 15102 15103 15104)


(when crouch jumping it´s the same thing, but if you first jump (standing) and then in next jump crouching then the normal (standing) will dissapear and the crouch counter comes up)
Crouched Jumps:
15102


---------------------


And it should save it so when the player joins again he still got his jumps. And if the player jumps in the same place two or three times it says "Cheating Detected, Player is jumping on the same place!" and it does not count those jumps. And it should have levels to for like 1000 jumps, newbie and like 5000 jumps, Are you even trying? and for 10 000, Better up. and for 20 000 Your getting it. and on 30 000 and so on. And when you type /jumps it comes up how many jumps you´ve made:
Player: Nick Has jumped [24956 Jumps] [15124 crouched Jumps]

A really big thanks to the guys who can help me with this, I know it´s a pretty big request but I´m going to give it to my friend in Christmas present in two days +Karma and a biiiig hug for any help at all

Last edited by rikards1; 12-22-2009 at 08:20.
rikards1 is offline
rikards1
Member
Join Date: Aug 2009
Old 01-01-2010 , 09:16   Re: Big Request
Reply With Quote #2

All who can help me gets admin on my server!
rikards1 is offline
Xellath
Veteran Member
Join Date: Dec 2007
Location: Sweden
Old 01-01-2010 , 10:14   Re: Big Request
Reply With Quote #3

I was feeling a bit bored; so I made your request. I did not make the cheat detection though. Feel free to change the code to match your request even more.

Please report back if something doesn't work.

Code:
#include < amxmodx > #include < hamsandwich > #include < engine > #include < nvault > #pragma semicolon 1 const MAX_CLIENTS = 32; enum _:CountTypes {     JUMP,     DUCK,     DUCKJUMP }; new g_iCounter[ MAX_CLIENTS + 1 ][ CountTypes ]; new g_szSteamID[ MAX_CLIENTS + 1 ][ 35 ]; new g_iVault; new const g_szSayCommands[ ][ ] = {     "/jumps",     "/jump",     "/ducks",     "/duck",     "/duckjumps",     "/duckjump" }; public plugin_init( ) {     register_plugin( "Jump/Duck Counter", "0.1.0", "Xellath" );         new szCommand[ MAX_CLIENTS ];     for( new i; i < sizeof( g_szSayCommands ); i++ )     {         formatex( szCommand, MAX_CLIENTS - 1, "say %s", g_szSayCommands[ i ] );                 register_clcmd( szCommand, "ClientCommand_Counter" );     }         RegisterHam( Ham_Player_Jump, "player", "Forward_HamPlayerJump" );     RegisterHam( Ham_Player_Duck, "player", "Forward_HamPlayerDuck" ); } public plugin_precache( ) {     g_iVault = nvault_open( "jumpcounter" );         if( g_iVault == INVALID_HANDLE )     {         set_fail_state( "Error opening up the nVault" );     } } public plugin_end( ) {     nvault_close( g_iVault ); } public client_authorized( iClient ) {     get_user_authid( iClient, g_szSteamID[ iClient ], 34 ); } public client_putinserver( iClient ) {     loadData( iClient ); } public client_disconnect( iClient ) {     saveData( iClient ); } public ClientCommand_Counter( iClient ) {     set_hudmessage( 255, 255, 255, 0.57, 0.0, _, _, 10.0, _, _, -1 );     show_hudmessage( iClient, "Normal Jumps: %i^n Ducks: %i^n DuckJumps: %i",\     g_iCounter[ iClient ][ JUMP ],\     g_iCounter[ iClient ][ DUCK ],\     g_iCounter[ iClient ][ DUCKJUMP ]     ); } public Forward_HamPlayerJump( iClient ) {     if( is_user_alive( iClient ) )     {         if( entity_get_int( iClient, EV_INT_flags ) & FL_DUCKING )         {             g_iCounter[ iClient ][ DUCKJUMP ]++;         }         else         {             g_iCounter[ iClient ][ JUMP ]++;         }     } } public Forward_HamPlayerDuck( iClient ) {     if( is_user_alive( iClient ) )     {         g_iCounter[ iClient ][ DUCK ]++;     } } saveData( iClient ) {     new szData[ MAX_CLIENTS ], szKey[ 35 ];         formatex( szData, MAX_CLIENTS - 1, "%i %i %i",\     g_iCounter[ iClient ][ JUMP ],\     g_iCounter[ iClient ][ DUCK ],\     g_iCounter[ iClient ][ DUCKJUMP ]     );     formatex( szKey, 34, "%s", g_szSteamID[ iClient ] );         nvault_set( g_iVault, szKey, szData ); } loadData( iClient ) {     new szData[ MAX_CLIENTS ], szKey[ 35 ], szPlayerData[ 3 ][ 9 ];         formatex( szData, MAX_CLIENTS - 1, "%i %i %i",\     g_iCounter[ iClient ][ JUMP ],\     g_iCounter[ iClient ][ DUCK ],\     g_iCounter[ iClient ][ DUCKJUMP ]     );     formatex( szKey, 34, "%s", g_szSteamID[ iClient ] );         nvault_get( g_iVault, szKey, szData, MAX_CLIENTS - 1 );         parse( szData,\     szPlayerData[ 0 ], charsmax( szPlayerData ),\     szPlayerData[ 1 ], charsmax( szPlayerData ),\     szPlayerData[ 2 ], charsmax( szPlayerData )     );         for( new i; i < CountTypes; i++ )     {         g_iCounter[ iClient ][ i ] = str_to_num( szPlayerData[ i ] );     } }
__________________
Achievements API - a simple way for you to create your OWN custom achievements!
Xellath is offline
rikards1
Member
Join Date: Aug 2009
Old 01-02-2010 , 12:49   Re: Big Request
Reply With Quote #4

Thanx man! I love you, you´re the best!
rikards1 is offline
rikards1
Member
Join Date: Aug 2009
Old 01-02-2010 , 13:06   Re: Big Request
Reply With Quote #5

Hey, could u add an counter like when u crouch jump / original jump:
DuckJumps: 1 (Dissapears when DuckJumps: 2 comes up)
DuckJumps: 2(Same thing but when DuckJumps: 3 comes up)
DuckJumps: 3(Dissapears when DuckJumps: 4 comes up)

And fix one thing, when u hold Duck it counts like 20 ducks on 1 sec and same thing with jump and crouch jump and if u have jump / duck on scroll it counts every "klick" on the scroll, please fix this. A tip, if u / some1, fix it, make it so it counts when u leave the ground not +jump becouse if it is +jump u can just hold down space or scroll for like 10 secs and same thing with Ctrl (duck)

Thanx again.

Last edited by rikards1; 01-03-2010 at 04:55.
rikards1 is offline
EXteRmiNaToR
Senior Member
Join Date: Dec 2009
Old 01-03-2010 , 06:56   Re: Big Request
Reply With Quote #6

What about adding a permanent message showing normal jumps,ducks and duck jumps and auto counting them in hud(ex. normal jumps:256,257,258 etc...)
EXteRmiNaToR is offline
rikards1
Member
Join Date: Aug 2009
Old 01-03-2010 , 11:22   Re: Big Request
Reply With Quote #7

Ye thats what i mean, and to fix the bug.
rikards1 is offline
Toastt
BANNED
Join Date: Nov 2009
Old 01-03-2010 , 19:51   Re: Big Request
Reply With Quote #8

so like a bhop counter?
Toastt is offline
rikards1
Member
Join Date: Aug 2009
Old 01-07-2010 , 13:02   Re: Big Request
Reply With Quote #9

Ye
rikards1 is offline
Old 01-16-2010, 07:21
rikards1
This message has been deleted by YamiKaitou. Reason: bump
rikards1
Member
Join Date: Aug 2009
Old 01-27-2010 , 15:02   Re: Big Request
Reply With Quote #10

Could some1 please help?
rikards1 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 11:26.


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