Raised This Month: $ Target: $400
 0% 

FindBestPlayer


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Podarok
BANNED
Join Date: Jan 2011
Location: Narnia
Old 04-28-2013 , 13:32   FindBestPlayer
Reply With Quote #1

How can i transfer
Code:
bestplayer
into event_roundstart()
?

Code:
public event_RoundStart() {     findBestPlayer()     get_user_name(bestplayer, BestName, 63) } findBestPlayer() {     new players[32], numplayers, id, bestplayer, Float:q, Float:tempq     get_players( players, numplayers, "a" )       if( numplayers <= 1 )     {         return players[0]     }     bestplayer = players[0]     q = float(get_user_frags(bestplayer )) / (float(get_user_deaths(bestplayer )) + 0.000001)     for(new i = 1; i < numplayers; i++ )     {         id = players[i]                 tempq = float(get_user_frags(id)) / (float(get_user_deaths(id)) + 0.000001)                 if( tempq > q)         {             q = tempq             bestplayer = id         }         }         return bestplayer }
It gives me undefined symbol :/
Podarok is offline
baneado
Veteran Member
Join Date: Dec 2012
Location: amxmodx-es.com
Old 04-28-2013 , 14:07   Re: FindBestPlayer
Reply With Quote #2

PHP Code:
return bestplayer 
-->

PHP Code:
new szName[32]
get_user_name(bestplayerszNamecharsmax(szName))

return 
szName

Last edited by baneado; 04-28-2013 at 14:11.
baneado is offline
Podarok
BANNED
Join Date: Jan 2011
Location: Narnia
Old 04-28-2013 , 16:01   Re: FindBestPlayer
Reply With Quote #3

You dont get the idea. I want to get best players name. Make HUD notification that he is best and then give some awards to him. How can I do this?
Podarok is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 04-28-2013 , 16:08   Re: FindBestPlayer
Reply With Quote #4

Code:
new bestplayer = findBestPlayer()
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
Podarok
BANNED
Join Date: Jan 2011
Location: Narnia
Old 04-28-2013 , 16:34   Re: FindBestPlayer
Reply With Quote #5

thanks Emp. Exactly what I wanted!
Podarok 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 10:52.


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