Raised This Month: $ Target: $400
 0% 

[Rankying System]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
frOOgy
Senior Member
Join Date: Jul 2014
Old 07-13-2014 , 19:10   [Rankying System]
Reply With Quote #1

I need plugins rankying system for cs 1.6. When player say: /rank then player can see menu:
[Rank System]:
1. Rank: %d of %s
2. Kills: %d | Deaths: %s
3. Online: %d

When player press any of 1, 2 or 3 button then menu closed.
__________________
Help me in other requests

Change Map System [PLUGIN]

GaG System [PLUGIN] [PLUGIN]
frOOgy is offline
Send a message via Skype™ to frOOgy
Eagle07
Veteran Member
Join Date: May 2014
Location: Morocco :D
Old 07-13-2014 , 21:54   Re: [Rankying System]
Reply With Quote #2

Tested & worked
--

--
Attached Files
File Type: sma Get Plugin or Get Source (Rank_System.sma - 615 views - 2.7 KB)
__________________
Eagle07 is offline
frOOgy
Senior Member
Join Date: Jul 2014
Old 07-13-2014 , 22:29   Re: [Rankying System]
Reply With Quote #3

TH Brother soo much!
__________________
Help me in other requests

Change Map System [PLUGIN]

GaG System [PLUGIN] [PLUGIN]
frOOgy is offline
Send a message via Skype™ to frOOgy
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 07-14-2014 , 09:12   Re: [Rankying System]
Reply With Quote #4

Quote:
Originally Posted by Eagle07 View Post
Tested & worked
--

--

eagle07 can you set task for menu only 10 sec
after 10 sec it will erase !!
__________________
Thanks everyone. #miss_you_all

Last edited by indraraj striker; 07-14-2014 at 09:27.
indraraj striker is offline
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 07-14-2014 , 10:55   Re: [Rankying System]
Reply With Quote #5

Eagle, why you open the vault on each player connect or disconnect. Waste of CPU. Just make it global, open it in plugin_init and close it in plugin_end.
And why (the hell?!) are you using player's IP as a key. It could be easily changed, you need the steamID instead.
Why you even get the info from the menu? Just destroy it in the handler no matter which option did the player use.
You don't need to format the vault data with formatex, since there is only one integer to save in (PlayedTime). Use num_to_str instead.
You also have some redundant lines with static Kills and Deaths, which you don't use anywhere.
I have fixed these little mistakes, here is the code.
Btw, it's disappearing after 10 seconds. If you don't want to, just remove these lines:
PHP Code:
set_task(10.0/*This is the time*/"CancelMenu"id)

/*......*/

public CancelMenu(id)
    if(
is_user_connected(id))
        
client_cmd(id"slot1"
Attached Files
File Type: sma Get Plugin or Get Source (RankInfo.sma - 725 views - 2.4 KB)
__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-14-2014 , 12:31   Re: [Rankying System]
Reply With Quote #6

Flicker didn't "fixed" everything.

1.
PHP Code:
if(gVault == INVALID_HANDLE)
        
set_fail_state("nVault returned invalid handle"
Put this in plugin_init, you don't need to waste server resources every time when a player disconnect.

2. Use formatex instead of format.
HamletEagle is offline
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 07-14-2014 , 14:06   Re: [Rankying System]
Reply With Quote #7

Didn't notice that. Let the OP have it on his mind, I'm not able to upload the new code now.
__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
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 15:14.


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