Jayzy Posted March 19, 2013 Posted March 19, 2013 How to disallow players from jumping to GM accounts using the @jumpto command Quote
Brian Posted March 21, 2013 Posted March 21, 2013 trunk/src/map/atcommand.c line 485, add this code: if ( pc_get_group_level(sd) < pc_get_group_level(pl_sd) ) { clif_displaymessage(fd, msg_txt(81)); // Your GM level doesn't authorize you to preform this action on the specified player. return -1; } So the final @jumpto block looks like this: /*========================================== * *------------------------------------------*/ ACMD_FUNC(jumpto) { struct map_session_data *pl_sd = NULL; nullpo_retr(-1, sd); if (!message || !*message) { clif_displaymessage(fd, msg_txt(911)); // Please enter a player name (usage: @jumpto/@warpto/@goto <char name/ID>). return -1; } if((pl_sd=map_nick2sd((char *)message)) == NULL && (pl_sd=map_charid2sd(atoi(message))) == NULL) { clif_displaymessage(fd, msg_txt(3)); // Character not found. return -1; } if (pl_sd->bl.m >= 0 && map[pl_sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif_displaymessage(fd, msg_txt(247)); // You are not authorized to warp to this map. return -1; } if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif_displaymessage(fd, msg_txt(248)); // You are not authorized to warp from your current map. return -1; } if ( pc_get_group_level(sd) < pc_get_group_level(pl_sd) ) { clif_displaymessage(fd, msg_txt(81)); // Your GM level doesn't authorize you to preform this action on the specified player. return -1; } if( pc_isdead(sd) ) { clif_displaymessage(fd, msg_txt(664)); return -1; } pc_setpos(sd, pl_sd->mapindex, pl_sd->bl.x, pl_sd->bl.y, CLR_TELEPORT); sprintf(atcmd_output, msg_txt(4), pl_sd->status.name); // Jumped to %s clif_displaymessage(fd, atcmd_output); return 0; } Save and recompile. Quote
Brian Posted March 19, 2013 Posted March 19, 2013 Do you have @jumpto enabled for normal players ?!! There is no GM level check in trunk/src/map/atcommand.c, but you could add one. Quote
Jayzy Posted March 21, 2013 Author Posted March 21, 2013 Yes I did for premium users. How can I add one? Quote
Question
Jayzy
How to disallow players from jumping to GM accounts using the @jumpto command
4 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.