kangfredy Posted April 21, 2013 Group: Members Topic Count: 112 Topics Per Day: 0.02 Content Count: 388 Reputation: 4 Joined: 05/01/12 Last Seen: October 25, 2022 Share Posted April 21, 2013 guys i want to ask..how to make @afk cannot use if player die??this is my afk function /*========================================== * @afk *------------------------------------------*/ ACMD_FUNC(afk) { nullpo_retr(-1, sd); if(map[sd->bl.m].flag.pvp || map [sd->bl.m].flag.gvg){ clif_displaymessage(fd, "kamu tidak di perbolehkan menggunakan di area pvp"); return -1;} sd->state.autotrade = 1; sd->state.monster_ignore = 1; pc_setsit(sd); skill_sit(sd,1); clif_sitting(&sd->bl); clif_specialeffect(&sd->bl, 234,AREA); clif_authfail_fd(fd, 15); } Quote Link to comment Share on other sites More sharing options...
nanakiwurtz Posted April 21, 2013 Group: Members Topic Count: 81 Topics Per Day: 0.02 Content Count: 1654 Reputation: 583 Joined: 08/09/12 Last Seen: May 3 Share Posted April 21, 2013 (edited) /*========================================== * @afk *------------------------------------------*/ ACMD_FUNC(afk) { nullpo_retr(-1, sd); if(map[sd->bl.m].flag.pvp || map [sd->bl.m].flag.gvg){ clif_displaymessage(fd, "kamu tidak di perbolehkan menggunakan di area pvp"); return -1;} if(pc_isdead(sd)) { clif_displaymessage(fd, "You can't use @afk when you are dead."); return -1;} sd->state.autotrade = 1; sd->state.monster_ignore = 1; pc_setsit(sd); skill_sit(sd,1); clif_sitting(&sd->bl); clif_specialeffect(&sd->bl, 234,AREA); clif_authfail_fd(fd, 15); } Edited April 21, 2013 by nanakiwurtz Quote Link to comment Share on other sites More sharing options...
icabit Posted April 21, 2013 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 353 Reputation: 70 Joined: 07/14/12 Last Seen: Yesterday at 02:46 AM Share Posted April 21, 2013 (edited) insert this in your @afk command in atcommand.c if (status_isdead(&sd->bl)){ clif_displaymessage(sd->fd,"You can not use @afk while dead."); return 0; } i use this code for most of my commands so they can't use that specific command when they are dead works great for me tested and proven with @go, @warp and @storage(these are the commands i have tried this code with) but looking at the code. its very much understandable what it does Edited April 21, 2013 by icabit Quote Link to comment Share on other sites More sharing options...
Question
kangfredy
guys i want to ask..how to make @afk cannot use if player die??
this is my afk function
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.