Napster - May 9, 2013 2:32
If player A (Group 99) use command [color=#0000ff][b]#hide <name>[/b][/color] to player B (Group 0)
Player B relogin to server --> display option hide on status --> [color=#ff0000][b]wrong[/b][/color]
Player A saw Player B --> display option hide off status
This post has been edited by
Napster
on May 9, 2013 2:34
Napster - May 9, 2013 16:12
@ind
test open 2 client and switch display btw
display 1 and 2
[color=rgb(40,40,40)][font=helvetica, arial, sans-serif][size=3]If player A (Group 99) use command [/size][/font][/color][color=rgb(0,0,255)][font=helvetica, arial, sans-serif][size=3][b]#hide <name>[/b][/size][/font][/color][color=rgb(40,40,40)][font=helvetica, arial, sans-serif][size=3] to player B (Group 0)[/size][/font][/color]
[code=:0]
if( sd->status.option & OPTION_INVISIBLE && !pc_can_use_command(sd, "@hide") )
sd->status.option &=~ OPTION_INVISIBLE;
[/code]
when player B relogin status Invisible on
But player A see player B Invisible off
[code=:0]
ACMD(hide)
{
nullpo_retr(-1, sd);
if (sd->sc.option & OPTION_INVISIBLE) {
sd->sc.option &= ~OPTION_INVISIBLE;
if (sd->disguise)
status_set_viewdata(&sd->bl, sd->disguise);
else
status_set_viewdata(&sd->bl, sd->status.class_);
clif->message(fd, msg_txt(10)); // Invisible: Off
// increment the number of pvp players on the map
map[sd->bl.m].users_pvp++;
if( map[sd->bl.m].flag.pvp && !map[sd->bl.m].flag.pvp_nocalcrank )
{// register the player for ranking calculations
sd->pvp_timer = add_timer( gettick() + 200, pc_calc_pvprank_timer, sd->bl.id, 0 );
}
//bugreport:2266
map_foreachinmovearea(clif->insight, &sd->bl, AREA_SIZE, sd->bl.x, sd->bl.y, BL_ALL, &sd->bl);
} else {
sd->sc.option |= OPTION_INVISIBLE;
sd->vd.class_ = INVISIBLE_CLASS;
clif->message(fd, msg_txt(11)); // Invisible: On
// decrement the number of pvp players on the map
map[sd->bl.m].users_pvp--;
if( map[sd->bl.m].flag.pvp && !map[sd->bl.m].flag.pvp_nocalcrank && sd->pvp_timer != INVALID_TIMER )
{// unregister the player for ranking
delete_timer( sd->pvp_timer, pc_calc_pvprank_timer );
sd->pvp_timer = INVALID_TIMER;
}
}
clif->changeoption(&sd->bl);
return true;
}
[/code]