01.03.2011, 20:45
Well the else if statement at the end of the code is not part of an if statement! So of course there's going to be an error, you should probably have it at the top of your script, it would make more sense. Then however thinking about it, it doesn't make sense, because then the command could never be used, you seem to require them to be in the dm, then you require them to be out of the DM, make up your mind and use only one of them, for example:
pawn Код:
CMD:exitdm(playerid, params[])
{
if(dmid[playerid] == -1) return SendClientMessage(playerid,red, "Error: You are not in a dm zone!");
for(new zone = 0; zone < MAX_ZONES; zone++) GangZoneHideForPlayer(playerid, zone);
dmid[playerid] = -1;
if(ingangwar[playerid] >0)
{
PlayersOnline--;
format(vstring,sizeof(vstring),"~>~ ~r~/gangwar: ~g~%d", PlayersOnline);
TextDrawSetString(Textdraw50,vstring);
ingangwar[playerid] = 0;
}
SetPlayerColor(playerid,playerColors[playerid]);
AutoRepairUsed[playerid] = 0;
AutoRepairTrigger[playerid] = 0;
SpawnPlayer(playerid);
gTeam[playerid] = TEAM_NOTH;
SendClientMessage(playerid,green,"Leave the deathmatch zone");
return 1;
}

