DM Zones
#4

What do you mean? u want telewarn?
This:
Код:
//Top of on you'r script
new DMZone[MAX_PLAYERS];
#define TELEWARN 1999

//onplayercommandtext
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(strcmp(cmdtext, "/mycommand", true) == 0)
	{
	if(DMZone[playerid] == 1) return ShowPlayerDialog(playerid,TELEWARN,DIALOG_STYLE_MSGBOX,"Error:","Teleporting Error!\n\n-Sorry But you can't Teleport to another area while in a dm. Type /kill to leave the DM.","Kill Me!","Cancel");
	//something here
	return 1;
	}
	if(strcmp(cmdtext, "/kill", true) == 0)
	{
	DMZone[playerid] = 0;
	SetPlayerHealth(playerid,0);
	ResetPlayerWeapons(playerid);
	return 1;
	}
	if(strcmp(cmdtext, "/leavedm", true) == 0)
	{
	DMZone[playerid] = 0;
	SetPlayerHealth(playerid,0);
	ResetPlayerWeapons(playerid);
	return 1;
	}
	return 0;
}
//ondialogresponse
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if (dialogid == TELEWARN)
		{
 		if(response == 1)
		{
		SetPlayerHealth(playerid,0);
		DMZone[playerid] = 0;
		}
    	return 1;
	}
	return 0;
 }
Reply


Messages In This Thread
DM Zones - by willsuckformoney - 13.07.2010, 08:56
Re: DM Zones - by wups - 13.07.2010, 09:52
Re: DM Zones - by willsuckformoney - 13.07.2010, 10:12
Re: DM Zones - by hab2ever - 13.07.2010, 10:29
Re: DM Zones - by willsuckformoney - 13.07.2010, 10:45
Re: DM Zones - by RyDeR` - 13.07.2010, 10:57
Re: DM Zones - by willsuckformoney - 13.07.2010, 11:06
Re: DM Zones - by RyDeR` - 13.07.2010, 11:37
Re: DM Zones - by willsuckformoney - 13.07.2010, 12:18
Re: DM Zones - by willsuckformoney - 13.07.2010, 12:38

Forum Jump:


Users browsing this thread: 1 Guest(s)