18.05.2010, 13:32
Like, if someone enters for example /minigun, it says a message: 'You need to type /dmq if youw ant to leave the dm area'
How to make that?
How to make that?
new DM[MAX_PLAYERS];
if(DM[playerid]==1)
{
DM[playerid]=0;
}
if(DM[playerid]&& strcmp(cmdtext, "/dmq", true)!=0)return SendClientMessage(playerid,COLOR_RED,"ERROR : You cannot use that command while your in the DM area! /dmq to exit the DM area.");
DM[playerid]=1;
//top new bool:InDmZone[MAX_PLAYERS]; if(!strcmp(cmdtext, "/dmz", true)) { InDmZone[playerid] = true; //other code here... }
if(!strcmp(cmdtext,"/pk 4",true) || !strcmp(cmdtext,"/pk4",true)) { if(InDmZone[playerid] == true) { GameTextForPlayer(playerid, "~y~type ~w~/kill",3000,3); SendClientMessage(playerid, 0xE4BC1BFF, "SERVER: YOU MUST EXIT THE DM ZONE FIRST, TYPE /KILL !!"); } else { //blah blah blah } return 1; } if(!strcmp(cmdtext, "/kill", true)) { SetPlayerHealth(playerid, 0.0); return 1; }
if(InDmZone[playerid] == true) { InDmZone[playerid] = false; SendClientMessage(playerid, 0xFF641AFF, "You have exited the DM zone !"); }
InDmZone[playerid] = false;