Hi,
wie kann ich machen das wenn z.b einer /dm eingibt keinen Command eingeben kann bis er wieder aus der DM rausgeht?
Das sozusagen alle Commands geblockt werden auser /dm um die DM zu verlassen!
Hier der /dm Command:
if(strcmp(cmdtext,"/dm",true)==0)
{
if(IsSpielerInDM[playerid] == 0)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s has entered DM (/dm)", name);
SendClientMessageToAll(0xAA3333AA, string);
SetPlayerPos(playerid,2208.0815,2189.2583,103.8786);
ResetPlayerWeapons(playerid);
GameTextForPlayer(playerid,"Welcome to /DM",4000,6);
GivePlayerWeapon(playerid, 26, 8000);
GivePlayerWeapon(playerid, 32, 8000);
SetPlayerHealth(playerid, 100.0);
SetPlayerArmour(playerid, 100.0);
sstats[2]++;
new s[100];
format(s,sizeof(s),"Deaths: %d | Kills: %d | DM: %d | BF: %d | AFK: %d",sstats[0], sstats[1], sstats[2], sstats[3], sstats[4]);
TextDrawSetString(stats,s);
IsSpielerInDM[playerid] = 1;
}
else {
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s has left DM (/dm)", name);
SendClientMessageToAll(0xAA3333AA, string);
IsSpielerInDM[playerid] = 0;
GivePlayerWeapon(playerid, 26, 1000);
GivePlayerWeapon(playerid, 32, 1000);
SetPlayerHealth(playerid, 100.0);
SetPlayerArmour(playerid, 100.0);
SetPlayerPos(playerid,2000.5702,1538.4266,13.5859);
sstats[2]--;
new s[100];
format(s,sizeof(s),"Deaths: %d | Kills: %d | DM: %d | BF: %d | AFK: %d",sstats[0], sstats[1], sstats[2], sstats[3], sstats[4]);
TextDrawSetString(stats,s);
}
return 1;
}
MfG ~Luka~