Small Help || Missplaced Bracket
#1

Код:
//=================/spgate=================//

    if(strcmp(cmd, "/spgate", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
            if (PlayerInfo[playerid][pJob] == 30 || PlayerInfo[playerid][pJob] == 31)
            {
				{
			        SendClientMessage(playerid, COLOR_WHITE, "You have placed a Adm Gate, /sprgate to Remove All Adm Gates.");
                    new Float:X,Float:Y,Float:Z,Float:A;
		            GetPlayerPos(playerid, X, Y, Z);
		            GetPlayerFacingAngle(playerid,A);
		            if(PlayerInfo[playerid][pJob] == 30)
					{
	                    RoadBlocksAdmin++;
	                    RoadBlockObject[RoadBlocksAdmin] = CreateObject(974, X, Y+1, Z, 0, 0, A);
	                }
	                else
	                {
	                    RoadBlocksAdmin++;
	                    RoadBlockObjectFBI[RoadBlocksAdmin] = CreateObject(974, X, Y+1, Z, 0, 0, A);
	                }
			    }
		    	else
			    {
			        SendClientMessage(playerid, COLOR_GREY, " You rank is to low to set a Road Block !");
	                return 1;
			    }
			}
		}
		return 1;
	}

	if(strcmp(cmd, "/sprgate", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
            if (PlayerInfo[playerid][pJob] == 30 || PlayerInfo[playerid][pJob] == 31)
            {
                {
			        SendClientMessage(playerid, COLOR_WHITE, "All Adm Gates destroyed..");
                    for(new o = 0; o < MAX_OBJECTS; o++)
                    {
						if(PlayerInfo[playerid][pJob] ==30)
						{
					        DestroyObject(RoadBlockObjectAdmin[o]);
                            RoadBlocksAdmin = 0;
                        }
                        else
						{
					        DestroyObject(RoadBlockObjectAdmin[o]);
                            RoadBlocksAdmin = 0;
                        }
                    }
			    }
			    else
			    {
			        SendClientMessage(playerid, COLOR_GREY, " You are not allowed to create a Adm Gate !");
	                return 1;
			    }
			}
		}
		return 1;
	}
Above the first SendClientMessage there first was:
Код:
			    if (PlayerInfo[playerid][pRank] > 1)
	            {
But i had to remove that, I didnt know what to do with the bracked it first had so i just left it there, If i remove it Pawno Crashed.
(PS: Same Problem for the second command)
Reply


Messages In This Thread
Small Help || Missplaced Bracket - by up2u - 24.05.2011, 13:16
Re: Small Help || Missplaced Bracket - by [DM]Kane - 24.05.2011, 13:29

Forum Jump:


Users browsing this thread: 2 Guest(s)