Jump to content
shadowrecon

Question About Player Routines

Recommended Posts

Okay so i just want to clarify some pretty basic stuff, about player switching routines. Does NextPlayer(False); switch to the next active player and set current player False? or does it switch to next false player? same with the switchplayer(False); Just currious it doesnt really state in the login include and ive been setting the player false then calling the procedure.

Link to comment
Share on other sites

[sCAR]{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

function SwitchToPlayer(Player: Integer; Active: Boolean): Boolean;

Contributors: Wanted

Description: Switches to player, Sets CurrentPlayer to 'Active'. True if login successful.

Date Created: September 25th, 2011. By Wanted. RS2 Build 666.

Last Modification: November 20th, 2011. By Wanted. RS2 Build 679.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

function SwitchToPlayer(Player: Integer; Active: Boolean): Boolean;

begin

WriteLn('SwitchToPlayer(' + Players[Player].Name + ', ' + BoolToStr(Active) + ');');

Players[CurrentPlayer].Active := Active;

CurrentPlayer := Player;

Result := Login;

end;

 

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

function NextPlayer(Active: Boolean): Boolean;

Contributors: Wanted

Description: Switches to next active player, Sets CurrentPlayer to 'Active'.

True if login successful.

Date Created: August 10th, 2011. By Wanted. RS2 Build 661.

Last Modification: September 25th, 2011. By Wanted. RS2 Build 666.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

function NextPlayer(Active: Boolean): Boolean;

begin

WriteLn('NextPlayer(' + BoolToStr(Active) + ');');

Logout;

Result := SwitchToPlayer(NextActivePlayerIndex, Active);

end;[/sCAR]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...