Versuch es mal so:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/aopenevent", cmdtext, true) == 0)
{
if(IsPlayerAdmin(playerid))
{
if(dmstatus[playerid] == 0)
{
dmstatus[playerid] = 1;
SendClientMessage(playerid, RED, "Du hast dass DM-Event gestartet!");
GameTextForAll("~r~DM-Arena ist nun Offen!",6000,6);
SendClientMessageToAll(LIGHTGREEN, "");
SendClientMessageToAll(LIGHTGREEN, "");
SendClientMessageToAll(LIGHTGREEN, "");
SendClientMessageToAll(LIGHTGREEN, "");
SendClientMessageToAll(LIGHTGREEN, "");
SendClientMessageToAll(LIGHTGREEN, "");
SendClientMessageToAll(LIGHTGREEN, "");
SendClientMessageToAll(LIGHTGREEN, "");
SendClientMessageToAll(LIGHTGREEN, "");
SendClientMessageToAll(LIGHTGREEN, "");
SendClientMessageToAll(LIGHTGREEN, "");
SendClientMessageToAll(LIGHTGREEN, "");
SendClientMessageToAll(LIGHTGREEN, "");
SendClientMessageToAll(LIGHTGREEN, "");
SendClientMessageToAll(LIGHTGREEN, "");
SendClientMessageToAll(LIGHTGREEN, "");
SendClientMessageToAll(LIGHTGREEN, "");
SendClientMessageToAll(LIGHTGREEN, "");
SendClientMessageToAll(LIGHTGREEN, "");
SendClientMessageToAll(LIGHTGREEN, "");
SendClientMessageToAll(LIGHTGREEN, "");
SendClientMessageToAll(LIGHTGREEN, "");
SendClientMessageToAll(LIGHTGREEN, "");
SendClientMessageToAll(LIGHTGREEN, "");
SendClientMessageToAll(LIGHTGREEN, "");
SendClientMessageToAll(LIGHTGREEN, "");
SendClientMessageToAll(LIGHTGREEN, "");
SendClientMessageToAll(LIGHTGREEN, "");
SendClientMessageToAll(LIGHTGREEN, "");
SendClientMessageToAll(LIGHTGREEN, "Um in die DM-Arene zu kommen benutze ***/event***");
return 1;
}
else if(dmstatus[playerid] == 1)
{
dmstatus[playerid] = 0;
SendClientMessage(playerid, RED, "Du hast dass DM-Event gestopt!");
return 1;
}
}
}
if (strcmp("/event", cmdtext, true) ==0)
{
if(dmstatus[playerid] == 0)
{
SendClientMessage(playerid, RED, "Dass DM-Event ist geschlossen");
return 1;
}
else if(dmstatus[playerid] == 1)
{
SendClientMessage(playerid, LIGHTBLUE, "Willkommen beim DM-Event");
SendClientMessage(playerid, LIGHTBLUE, "Bitte warte an deinem Spawn!");
SendClientMessage(playerid, LIGHTBLUE, "Es wird gleich ein Admin kommen!");
SetPlayerHealth(playerid, 100.0);
InEvent[playerid] = 1;
return 1;
}
}
if (strcmp("/eventexit", cmdtext, true) ==0)
{
if(InEvent[playerid] == 1)
{
SetPlayerPos(playerid, 0.0, 0.0, 0.0);
SetPlayerHealth(playerid, 100.0);
InEvent[playerid] = 0;
return 1;
}
else if(InEvent[playerid] == 0)
{
SendClientMessage(playerid, RED, "Du bist nicht im Event! *** /event ***");
return 1;
}
}
if (strcmp("/aevent",cmdtext, true) ==0)
{
if(IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, LIGHTBLUE, "Willkommen beim DM-Event!");
SetPlayerPos(playerid, 1614.1831054688, -5028.5185546875, 28.30467033386);
return 1;
}
}
if (strcmp("/eventstatus", cmdtext, true) ==0)
{
if(IsPlayerAdmin(playerid))
{
if(dmstatus[playerid] == 0)
{
SendClientMessage(playerid, LIGHTBLUE, "*** Event Status ***");
SendClientMessage(playerid, LIGHTBLUE, "*** DM-Event - Geschlossen ***");
return 1;
}
else if(dmstatus[playerid] == 1)
{
SendClientMessage(playerid, LIGHTBLUE, "*** Event Status ***");
SendClientMessage(playerid, LIGHTBLUE, "*** DM-Event - Geöffnet ***");
return 1;
}
}
return 1;
}
return 0;
}
So klappt es bei mir.