Jump to content
  • 0

Question

Posted

I want to add @warp command to players

but I don't want the players to warp to que_moon or as example gm_room 

How can I edit @warp command for normal players?

1 answer to this question

Recommended Posts

  • 0
Posted (edited)

remove the @warp usage from the player group id confing

and create a script like this

-	script player_warp_command	-1,{
OnUse:
	.@command$ = strtolower(.@atcmd_parameters$[0]);
	if(.@command$ == "")
		end;
	if(inarry(.map_black_list$,.@command$) != -1){
		if(.@atcmd_numparameters == 3){
			warp(.@command$,atoi(.@atcmd_parameters$[1]),atoi(.@atcmd_parameters$[2]));
		}else{
			warp(.@command$,0,0);
		}
	}
end;

OnInit:
	bindatcmd "warp",strnpcinfo(3)+"::OnUse",0,99;
	setarray .map_black_list$,"gm_room","que_moon";//black listed maps.
end;
}

if it get over the gm's @warp command , i would suggest to change the name to for example @w

Edited by sader1992
fix errors

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...