• 0
Sign in to follow this  
kentbsece

Disable player commands (@go @warp @storage etc...)

Question

Hi,

How to disable player commands when his/her character dies?

e.i.: If player dies, he/she should not be able to use game commands (like @go, @warp, etc.)

 

Thank You!

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0
atcommand.cpp
ACMD_FUNC(storage)
{
	nullpo_retr(-1, sd);
	if (sd->npc_id || sd->state.vending || sd->state.buyingstore || sd->state.trading || sd->state.storage_flag || pc_isdead(sd)) // Add pc_isdead(sd)

ACMD_FUNC(go)
{
	if (status_isdead(&sd->bl)){ // Add this line to your @go atcmd
	clif_displaymessage(sd->fd,"You can not use this command while dead.");
	return 0;

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this