Raised This Month: $32 Target: $400
 8% 

uq_armorspeed


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Statistical        Approver:   ConnorMcLeod (74)
borjomi
Senior Member
Join Date: May 2010
Location: Russia, Novosibirsk
Old 11-01-2010 , 07:32   uq_armorspeed
Reply With Quote #1

Speed in armor by BorJomi
v1.3


Description:
  • This simple plugin shows player speed instead of armor
Player cmd:
  • say /uqspeed- enabled/disabled showing speed
Requirements:
  • Hamsandwich module
changelog
Code:
v1.2 - some small fixes
v1.3 - cs_set_user_armor replaced by pev_armorvalue
Attached Files
File Type: sma Get Plugin or Get Source (uq_armorspeed.sma - 2306 views - 1.4 KB)

Last edited by borjomi; 11-01-2010 at 11:19.
borjomi is offline
Send a message via ICQ to borjomi
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-01-2010 , 09:15   Re: uq_armorspeed
Reply With Quote #2

Just set armorvalue in UpdateClientData pre forward, games will send message for you ;)
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 11-01-2010 , 09:28   Re: uq_armorspeed
Reply With Quote #3

- g_userconnect is useless here, and its never set to false btw
- velocity[2]-=velocity[2]; just set it to 0.0
- if(flags&FL_ONGROUND && flags&FL_INWATER) -> if( flags & ( FL_ONGROUND | FL_INWATER ) ) (you can define it as const)
__________________

Last edited by xPaw; 11-01-2010 at 09:30.
xPaw is offline
borjomi
Senior Member
Join Date: May 2010
Location: Russia, Novosibirsk
Old 11-01-2010 , 10:07   Re: uq_armorspeed
Reply With Quote #4

about g_userconnect i forget put it into client_disconnect) about other problem i try to check and do better)


//update plug

Last edited by borjomi; 11-01-2010 at 10:26.
borjomi is offline
Send a message via ICQ to borjomi
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-01-2010 , 10:42   Re: uq_armorspeed
Reply With Quote #5

I also had forgotten that this plugin had been submitted before yours and do the same with exactly same code : -Plugin-

But that's not a reason to not improve your code ;)
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
borjomi
Senior Member
Join Date: May 2010
Location: Russia, Novosibirsk
Old 11-01-2010 , 10:49   Re: uq_armorspeed
Reply With Quote #6

Quote:
Originally Posted by ConnorMcLeod View Post
I also had forgotten that this plugin had been submitted before yours and do the same with exactly same code : -Plugin-

But that's not a reason to not improve your code ;)
funny.. but i write my mini plugins few month ago and my mini plugins (uq_armorspeed, uq_moneyspeed) are very similar))) http://unique-kz.com/download.php?list=4, so if his plugin is normal approve it.. and my plug you can move into unapprove section.

Last edited by borjomi; 11-01-2010 at 10:56.
borjomi is offline
Send a message via ICQ to borjomi
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-01-2010 , 10:54   Re: uq_armorspeed
Reply With Quote #7

Ok.

I've just checked cstrike modules sources again and ArmorValue message is not send by the native.
ArmorType message is still sent for nothing, so you still need to replace cstrike native with armorvalue (you don't even need to round it).
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
borjomi
Senior Member
Join Date: May 2010
Location: Russia, Novosibirsk
Old 11-01-2010 , 11:24   Re: uq_armorspeed
Reply With Quote #8

updated
borjomi is offline
Send a message via ICQ to borjomi
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-01-2010 , 11:48   Re: uq_armorspeed
Reply With Quote #9

Would be better to declare FL_CHECK as a const, but it doesn't make any significant difference.
Also, flags and speed vars are not needed since they are used only 1 time.
End, consider that some plugins (especially on kz servers) put players into spectator team, so Ham_Killed won't be set and your alive variable will hold wrong value, i think it's better to keep is_user_alive native.

Approved.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 23:02.


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