AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   waiting list (https://forums.alliedmods.net/showthread.php?t=250798)

omgdpcwtf 10-30-2014 16:32

waiting list
 
Hi,
I wanna make waiting list for DeathRun duel, but I dont know how. Does somebody has some ideas and examples how do it?

explanation: First CT came to button and pressed it. Duel is active. Then came another CT and pressed button (here I need to set him to waiting list, if first CT will die second CT starts duel with T) then it continues to third CT, fourth CT.....

claudiuhks 11-02-2014 08:34

Re: waiting list
 
This is how vectors work, in case you don't already know. For any other requests, visit "Suggestions/ Requests" category.

PHP Code:

new Array:Container;

main()
  
Container ArrayCreate();

exit()
  
ArrayDestroy(Container);

push_back(playerId)
  
ArrayPushCell(ContainerplayerId);

get_from_tail()
  return 
ArrayGetCell(ContainerArraySize(Container) - 1);

iterate(bool:Ascending true)
{
  new 
playerIdi;
  if (
Ascending)
  {
    for (
0ArraySize(Container); i++)
      
playerId ArrayGetCell(Containeri);
  } else {
    for (
ArraySize(Container) - 1>= 0i--)
      
playerId ArrayGetCell(Containeri);
  }



omgdpcwtf 11-09-2014 07:03

Re: waiting list
 
Anyone else any ideas? IDK how arrays works and how use it with messages.


All times are GMT -4. The time now is 17:30.

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