Raised This Month: $ Target: $400
 0% 

Find highest number, and announce to players


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Cronck
Member
Join Date: Apr 2005
Old 04-22-2005 , 12:05   Find highest number, and announce to players
Reply With Quote #1

This script is supposed to find the highest number in iPlayerDamage[id][7]
7 is contains the total amount of damage the player has done the current round. id is the player id.

Whats wrong with it? And im sure there is a better way of making this...

Code:
public eventEndRound() {     new player[31]     new hits[3]     new damage[3] = (0,0,0)         for (new i = 0; i >= 32; i++) {         if ( iPlayerDamage[i][5] > damage[3] ) {             get_user_info(i, "name", player, 31)             damage[1] = iPlayerDamage[i]             hits[1] = iPlayerDamage[7]         }     }     set_hudmessage(0, 200, 200, 0.60, 0.35, 0, 0.1, 5.0, 0.3, 0.3, 4)     show_hudmessage(0,"Most damage was done^nby %s ^n %i dmg / %i hits", player, damage[1], hits[1])        return PLUGIN_CONTINUE }
Cronck is offline
 



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:03.


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