01.03.2011, 20:09
Your code is very messy and difficult to read, also it seems that you're not actually finishing the command with a final bracket. Have a look at this example:
It's a lot easier to read and see where you have gone wrong, in this case it seems the main problem is a missing bracket at the end of the command.
Note: It helps people to help you when you outline which lines they are pointing at, line 16 thousand and something means nothing to us in this context.
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");
else if(dmid[playerid] != -1) return SendClientMessage(playerid,red,"ERROR: You cannot use command in dm!");
return 1;
}
Note: It helps people to help you when you outline which lines they are pointing at, line 16 thousand and something means nothing to us in this context.