Order Players on Jailtime With Function/Stock -
Admigo - 21.11.2013
Hello all,
I am trying to make an order function for the players in jail.
Like the function
pawn Код:
GetPlayerTopJailTime(1);//Will return the player with highest jailtime
GetPlayerTopJailTime(2);//Will return the player with the second highest jailtime
Any idea how i can manage this?
Admigo
Re: Order Players on Jailtime With Function/Stock -
DarkLored - 21.11.2013
Explain more
from what i notice you want the function or the stock to contain the jail time for the player
Re: Order Players on Jailtime With Function/Stock -
$Marco$ - 21.11.2013
Quote:
Originally Posted by DarkLored
Explain more
from what i notice you want the function or the stock to contain the jail time for the player
|
What he means is that he wants to create a command for the highest jail time in the server for example.
Upon writing /highjtime
You will get the following:
#1 Rocky -
4985 seconds of jail time.
#2 Eddy -
3651 seconds of jail time.
#3 Stan -
1254 seconds of jail time.
#4 Harry -
651 seconds of jail time.
#5 Lewis 241 seconds of jail time.
Re: Order Players on Jailtime With Function/Stock -
DarkLored - 21.11.2013
Then i dont have any idea how to make it
Re: Order Players on Jailtime With Function/Stock -
Djole1337 - 21.11.2013
Search for order by desc function.
Re: Order Players on Jailtime With Function/Stock -
dominik523 - 21.11.2013
I would try to make top player with jail time like this:
Код:
new amount;
new player;
player = -1;
foreach(Player, i)
{
if(pJailTime[i] > amount)
player = i;
}
Re: Order Players on Jailtime With Function/Stock -
Admigo - 21.11.2013
Quote:
Originally Posted by dominik523
I would try to make top player with jail time like this:
Код:
new amount;
new player;
player = -1;
foreach(Player, i)
{
if(pJailTime[i] > amount)
player = i;
}
|
I need the GetPlayerTopJailTime(1) code because i am using a different way of making menu's.
I hope someone has a solution to make this function/stock.
Quote:
Re: Order Players on Jailtime With Function/Stock
Citaat:
Oorspronkelijk geplaatst door DarkLored Bekijk bericht
Explain more
from what i notice you want the function or the stock to contain the jail time for the player
What he means is that he wants to create a command for the highest jail time in the server for example.
Upon writing /highjtime
You will get the following:
#1 Rocky - 4985 seconds of jail time.
#2 Eddy - 3651 seconds of jail time.
#3 Stan - 1254 seconds of jail time.
#4 Harry - 651 seconds of jail time.
#5 Lewis 241 seconds of jail time.
|
Thanks for your explanation.
Re: Order Players on Jailtime With Function/Stock -
Admigo - 22.11.2013
Bump
Re: Order Players on Jailtime With Function/Stock - Patrick - 22.11.2013
Quote:
Originally Posted by Admigo
Bump 
|
I think I got a code in my mind, mind showing me your jail system? I would recommend putting it in a stock or a callback
Re: Order Players on Jailtime With Function/Stock -
Admigo - 22.11.2013
Quote:
Originally Posted by pds2k12
I think I got a code in my mind, mind showing me your jail system? I would recommend putting it in a stock or a callback
|
I only use the variables:
Код:
IsJailed[playerid]=1;
JailTime[playerid]=60;//60 seconds in jail