Warum ne Enum klasse obwohl nur eine Variable vorhanden ist ?
enum pInfo
{
DM,
Float:x87,
Float:y87,
Float:z87,
};
new PlayerInfo[MAX_PLAYERS][pInfo];
if(strcmp(cmdtext, "/dm", true) == 0)
{
if (PlayerInfo[playerid][DM] == 1) return SendClientMessage(playerid,COLOR_RED,"Du bist bereits in einem Deathmatch!")
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 29, 130);
SetPlayerPos(playerid, -33.6020,1507.4240,95.4173); // Dm zone
SendClientMessageToAll(COLOR_BLUE, "Jemand hat da gerade /DM betreten. ;)");
PlayerInfo[playerid][DM] = 0;
//
GetPlayerPos(playerid,x87[playerid],y87[playerid],z87[playerid]);
return 1;
}
if(strcmp(cmdtext, "/dmexit") == 0) {
new dm[50], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(dm, sizeof(dm), "%s hat die DM Area verlassen. /dmexit", pname);
SendClientMessageToAll(COLOR_LIGHTBLUE, dm);
SetPlayerPos(playerid,PlayerInfo[playerid][x87],PlayerInfo[playerid][y87],PlayerInfo[playerid][z87]); //Der Spieler wird an seine alte Position gesetzt
SetPlayerHealth(playerid, 100.0);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 22, 100);
SendClientMessage(playerid, 0xAA3333AA, "Du hast die DM Area verlassen.");
PlayerInfo[playerid][DM] = 0;
return 1;
}