shadowrecon Posted February 28, 2012 Share Posted February 28, 2012 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. Quote Link to comment Share on other sites More sharing options...
Wanted Posted February 28, 2012 Share Posted February 28, 2012 [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] Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted February 28, 2012 Share Posted February 28, 2012 Does NextPlayer(False); switch to the next active player and set current player False?So...To translate Wanted's answer into english: It does exactly what you have stated. Also NextPlayer will logout first, SwitchToPlayer doesn't. Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted February 28, 2012 Author Share Posted February 28, 2012 So...To translate Wanted's answer into english: It does exactly what you have stated. Also NextPlayer will logout first, SwitchToPlayer doesn't. i just had a brain fart... answers were right there whole time.. err.. thanks guys. sorry for the stupid question. Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted February 28, 2012 Share Posted February 28, 2012 i just had a brain fart... answers were right there whole time.. err.. thanks guys. sorry for the stupid question.I wouldn't worry about it. You ain't got nothing on some of the dumb questions I have asked in the past. Quote Link to comment Share on other sites More sharing options...