Warnings/Erors script fvr
#1

Код:
	if(strcmp(cmd, "/factionvehrespawn", true) == 0 || strcmp(cmd, "/fvr", true) == 0)
    {
      if(PlayerInfo[playerid][pLeader] == 1)
	  {
		 SetVehicleToRespawn(car[police1]);
		 SetVehicleToRespawn(car[police2]);
		 SetVehicleToRespawn(car[police3]);
		 SetVehicleToRespawn(car[police4]);
		 SetVehicleToRespawn(car[police5]);
		 SetVehicleToRespawn(car[police6]);
		 SetVehicleToRespawn(car[police7]);
		 SetVehicleToRespawn(car[police8]);
		 SetVehicleToRespawn(car[police9]);
		 SetVehicleToRespawn(car[police10]);
		 SetVehicleToRespawn(car[police11]);
		 SetVehicleToRespawn(car[police12]);
		 SetVehicleToRespawn(car[police13]);
		 SetVehicleToRespawn(car[police14]);
		 SetVehicleToRespawn(car[police15]);
		 SetVehicleToRespawn(car[police16]);
		 SetVehicleToRespawn(car[police17]);
		 SetVehicleToRespawn(car[police18]);
		 SetVehicleToRespawn(car[police19]);
		 SetVehicleToRespawn(car[police20]);
		 SetVehicleToRespawn(car[police21]);
		 SetVehicleToRespawn(car[police22]);
		 SetVehicleToRespawn(car[police23]);
         for(new i = 0; i < MAX_PLAYERS; i ++)
         {
		   if(PlayerInfo[i][pMember] == 1||PlayerInfo[i][pLeader] == 1)
		   {
                format(string, sizeof(string), " All faction cars have been respawned by Leader %s.", sendername);
                SCM(i,COLOR_LIGHTBLUE,string);
           }
   		 }
      }
	  else if(PlayerInfo[playerid][pLeader] == 2)
	  {
         SetVehicleToRespawn(car[82]);
		 SetVehicleToRespawn(car[fbi1]);
		 SetVehicleToRespawn(car[fbi2]);
		 SetVehicleToRespawn(car[fbi3]);
		 SetVehicleToRespawn(car[fbi4]);
		 SetVehicleToRespawn(car[fbi5]);
		 SetVehicleToRespawn(car[fbi6]);
         for(new i = 0; i < MAX_PLAYERS; i ++)
         {
		   if(PlayerInfo[i][pMember] == 2||PlayerInfo[i][pLeader] == 2)
		   {
                format(string, sizeof(string), " All faction cars have been respawned by Leader %s.", sendername);
                SCM(i,COLOR_LIGHTBLUE,string);
           }
   		 }
      }
      else if(PlayerInfo[playerid][pLeader] == 3)
	  {
		 SetVehicleToRespawn(car[ng1car]);
		 SetVehicleToRespawn(car[ng2car]);
		 SetVehicleToRespawn(car[ng3speed]);
		 SetVehicleToRespawn(car[ng5]);
		 SetVehicleToRespawn(car[ng4]);
		 SetVehicleToRespawn(car[ng6]);
		 SetVehicleToRespawn(car[ng7]);
		 SetVehicleToRespawn(car[ng8]);
		 SetVehicleToRespawn(car[ng9]);
		 SetVehicleToRespawn(car[ng10]);
		 SetVehicleToRespawn(car[ng11]);
         for(new i = 0; i < MAX_PLAYERS; i ++)
         {
		   if(PlayerInfo[i][pMember] == 3||PlayerInfo[i][pLeader] == 3)
		   {
                format(string, sizeof(string), " All faction cars have been respawned by Leader %s.", sendername);
                SCM(i,COLOR_LIGHTBLUE,string);
           }
   		 }

      }
      else if(PlayerInfo[playerid][pLeader] == 4)
	  {
         SetVehicleToRespawn(car[ambulance5]);
		 SetVehicleToRespawn(car[ambulance1]);
		 SetVehicleToRespawn(car[ambulance2]);
		 SetVehicleToRespawn(car[ambulance3]);
		 SetVehicleToRespawn(car[ambulance4]);
		 SetVehicleToRespawn(car[ambulance6]);
		 SetVehicleToRespawn(car[ambulance7]);
		 SetVehicleToRespawn(car[ambulance8]);
         for(new i = 0; i < MAX_PLAYERS; i ++)
         {
		   if(PlayerInfo[i][pMember] == 4||PlayerInfo[i][pLeader] == 4)
		   {
                format(string, sizeof(string), " All faction cars have been respawned by Leader %s.", sendername);
                SCM(i,COLOR_LIGHTBLUE,string);
           }
   		 }

      }
      else if(PlayerInfo[playerid][pLeader] == 5)
	  {
         SetVehicleToRespawn(car[cuncar]);
		 SetVehicleToRespawn(car[cuncar1]);
		 SetVehicleToRespawn(car[cuncar2]);
		 SetVehicleToRespawn(car[cuncar3]);
		 SetVehicleToRespawn(car[cuncar4]);
		 SetVehicleToRespawn(car[cuncar5]);
		 SetVehicleToRespawn(car[cuncar6]);
         for(new i = 0; i < MAX_PLAYERS; i ++)
         {
		   if(PlayerInfo[i][pMember] == 5||PlayerInfo[i][pLeader] == 5)
		   {
                format(string, sizeof(string), " All faction cars have been respawned by Leader %s.", sendername);
                SCM(i,COLOR_LIGHTBLUE,string);
           }
   		 }

      }
      else if(PlayerInfo[playerid][pLeader] == 6)
	  {
         SetVehicleToRespawn(car[corcar]);
		 SetVehicleToRespawn(car[corcar1]);
		 SetVehicleToRespawn(car[corcar2]);
		 SetVehicleToRespawn(car[corcar3]);
		 SetVehicleToRespawn(car[corcar4]);
		 SetVehicleToRespawn(car[corcar5]);
		 SetVehicleToRespawn(car[corcar6]);
         for(new i = 0; i < MAX_PLAYERS; i ++)
         {
		   if(PlayerInfo[i][pMember] == 6||PlayerInfo[i][pLeader] == 6)
		   {
                format(string, sizeof(string), " All faction cars have been respawned by Leader %s.", sendername);
                SCM(i,COLOR_LIGHTBLUE,string);
           }
   		 }

      }
      else if(PlayerInfo[playerid][pLeader] == 7)
	  {
         SetVehicleToRespawn(car[mayor1]);
		 SetVehicleToRespawn(car[mayor2]);
		 SetVehicleToRespawn(car[mayor3]);
		 SetVehicleToRespawn(car[mayor4]);
         for(new i = 0; i < MAX_PLAYERS; i ++)
         {
		   if(PlayerInfo[i][pMember] == 7||PlayerInfo[i][pLeader] == 7)
		   {
                format(string, sizeof(string), " All faction cars have been respawned by Leader %s.", sendername);
                SCM(i,COLOR_LIGHTBLUE,string);
           }
   		 }

      }
      else if(PlayerInfo[playerid][pLeader] == 8)
	  {
		 SetVehicleToRespawn(car[hit1]);
		 SetVehicleToRespawn(car[hit2]);
		 SetVehicleToRespawn(car[hit3]);
		 SetVehicleToRespawn(car[hit4]);
		 SetVehicleToRespawn(car[hit5]);
		 SetVehicleToRespawn(car[hit6]);
		 SetVehicleToRespawn(car[hit7]);
		 SetVehicleToRespawn(car[hit8]);
         for(new i = 0; i < MAX_PLAYERS; i ++)
         {
		   if(PlayerInfo[i][pMember] == 8||PlayerInfo[i][pLeader] == 8)
		   {
                format(string, sizeof(string), " All faction cars have been respawned by Leader %s.", sendername);
                SCM(i,COLOR_LIGHTBLUE,string);
           }
   		 }

      }
      else if(PlayerInfo[playerid][pLeader] == 9)
	  {
		 SetVehicleToRespawn(car[news1]);
		 SetVehicleToRespawn(car[news2]);
		 SetVehicleToRespawn(car[news3]);
		 SetVehicleToRespawn(car[news4]);
		 SetVehicleToRespawn(car[news5]);
		 SetVehicleToRespawn(car[news6]);
         for(new i = 0; i < MAX_PLAYERS; i ++)
         {
		   if(PlayerInfo[i][pMember] == 9||PlayerInfo[i][pLeader] == 9)
		   {
                format(string, sizeof(string), " All faction cars have been respawned by Leader %s.", sendername);
                SCM(i,COLOR_LIGHTBLUE,string);
           }
   		 }

      }
      else if(PlayerInfo[playerid][pLeader] == 10)
	  {
		 SetVehicleToRespawn(car[taxi1]);
		 SetVehicleToRespawn(car[taxi2]);
		 SetVehicleToRespawn(car[taxi3]);
		 SetVehicleToRespawn(car[taxi4]);
		 SetVehicleToRespawn(car[taxi5]);
		 SetVehicleToRespawn(car[taxi6]);
		 SetVehicleToRespawn(car[taxi11]);
		 SetVehicleToRespawn(car[taxi12]);
		 SetVehicleToRespawn(car[taxi13]);
         for(new i = 0; i < MAX_PLAYERS; i ++)
         {
		   if(PlayerInfo[i][pMember] == 10||PlayerInfo[i][pLeader] == 10)
		   {
                format(string, sizeof(string), " All faction cars have been respawned by Leader %s.", sendername);
                SCM(i,COLOR_LIGHTBLUE,string);
           }
   		 }
      }
      else if(PlayerInfo[playerid][pLeader] == 11)
	  {
		 SetVehicleToRespawn(car[school1]);
		 SetVehicleToRespawn(car[school2]);
		 SetVehicleToRespawn(car[school3]);
		 SetVehicleToRespawn(car[school4]);
		 SetVehicleToRespawn(car[schoolhel1]);
		 SetVehicleToRespawn(car[schoolhel2]);
         for(new i = 0; i < MAX_PLAYERS; i ++)
         {
		   if(PlayerInfo[i][pMember] == 11||PlayerInfo[i][pLeader] == 11)
		   {
                format(string, sizeof(string), " All faction cars have been respawned by Leader %s.", sendername);
                SCM(i,COLOR_LIGHTBLUE,string);
           }
      }
      else if(PlayerInfo[playerid][pLeader] == 12)
	  {
		 SetVehicleToRespawn(car[barcar]);
		 SetVehicleToRespawn(car[barcar1]);
		 SetVehicleToRespawn(car[barcar2]);
		 SetVehicleToRespawn(car[barcar3]);
		 SetVehicleToRespawn(car[barcar4]);
		 SetVehicleToRespawn(car[barcar5]);
		 SetVehicleToRespawn(car[barcar6]);
         for(new i = 0; i < MAX_PLAYERS; i ++)
         {
		   if(PlayerInfo[i][pMember] == 11||PlayerInfo[i][pLeader] == 11)
		   {
                format(string, sizeof(string), " All faction cars have been respawned by Leader %s.", sendername);
                SCM(i,COLOR_LIGHTBLUE,string);
          }
      }
      else if(PlayerInfo[playerid][pLeader] == 13)
	  {
		 SetVehicleToRespawn(car[tatcar]);
		 SetVehicleToRespawn(car[tatcar1]);
		 SetVehicleToRespawn(car[tatcar2]);
		 SetVehicleToRespawn(car[tatcar3]);
		 SetVehicleToRespawn(car[tatcar4]);
		 SetVehicleToRespawn(car[tatcar5]);
		 SetVehicleToRespawn(car[tatcar6]);
         for(new i = 0; i < MAX_PLAYERS; i ++)
         {
		   if(PlayerInfo[i][pMember] == 11||PlayerInfo[i][pLeader] == 11)
		   {
                format(string, sizeof(string), " All faction cars have been respawned by Leader %s.", sendername);
                SCM(i,COLOR_LIGHTBLUE,string);
          }
      }
      else if(PlayerInfo[playerid][pLeader] == 14)
	  {
		 SetVehicleToRespawn(car[pcar]);
		 SetVehicleToRespawn(car[pcar1]);
		 SetVehicleToRespawn(car[pcar2]);
		 SetVehicleToRespawn(car[pcar3]);
		 SetVehicleToRespawn(car[pcar4]);
		 SetVehicleToRespawn(car[pcar5]);
		 SetVehicleToRespawn(car[pcar6]);
         for(new i = 0; i < MAX_PLAYERS; i ++)
         {
		   if(PlayerInfo[i][pMember] == 11||PlayerInfo[i][pLeader] == 11)
		   {
                format(string, sizeof(string), " All faction cars have been respawned by Leader %s.", sendername);
                SCM(i,COLOR_LIGHTBLUE,string);
          }
      }
      else if(PlayerInfo[playerid][pLeader] == 15)
	  {
		 SetVehicleToRespawn(car[scar]);
		 SetVehicleToRespawn(car[scar1]);
		 SetVehicleToRespawn(car[scar2]);
		 SetVehicleToRespawn(car[scar3]);
		 SetVehicleToRespawn(car[scar4]);
		 SetVehicleToRespawn(car[scar5]);
		 SetVehicleToRespawn(car[scar6]);
         for(new i = 0; i < MAX_PLAYERS; i ++)
         {
		   if(PlayerInfo[i][pMember] == 11||PlayerInfo[i][pLeader] == 11)
		   {
                format(string, sizeof(string), " All faction cars have been respawned by Leader %s.", sendername);
                SCM(i,COLOR_LIGHTBLUE,string);
            }
      }
      else if(PlayerInfo[playerid][pLeader] == 16)
	  {
		 SetVehicleToRespawn(car[tcccar]);
		 SetVehicleToRespawn(car[tcccar1]);
		 SetVehicleToRespawn(car[tcccar2]);
		 SetVehicleToRespawn(car[tcccar3]);
		 SetVehicleToRespawn(car[tcccar4]);
		 SetVehicleToRespawn(car[tcccar5]);
         for(new i = 0; i < MAX_PLAYERS; i ++)
         {
		   if(PlayerInfo[i][pMember] == 11||PlayerInfo[i][pLeader] == 11)
		   {
                format(string, sizeof(string), " All faction cars have been respawned by Leader %s.", sendername);
                SCM(i,COLOR_LIGHTBLUE,string);
           }
	 	 }
      }
      else
      {
		   SCM(playerid,COLOR_GREY," You are not the leader of an illegal faction !");
      }
return 1;
}
something is wrong in this command, it gives me 26 errors specific PWN!
playertopoint etc. ..

What is wrong with the command
Reply
#2

Your code is missing brackets ( } ).
Reply
#3

I do not understand. where is the mistake?
Reply
#4

Just organize your code.

Example:
pawn Код:
if(strcmp(cmd, "/factionvehrespawn", true) == 0 || strcmp(cmd, "/fvr", true) == 0)
{// Open
    if(PlayerInfo[playerid][pLeader] == 1)
    {//Open
        //Rest of code.
    }//Close
}//Close
Reply
#5

rest of code
Код:
         SetVehicleToRespawn(car[82]);
		 SetVehicleToRespawn(car[fbi1]);
		 SetVehicleToRespawn(car[fbi2]);
		 SetVehicleToRespawn(car[fbi3]);
		 SetVehicleToRespawn(car[fbi4]);
		 SetVehicleToRespawn(car[fbi5]);
		 SetVehicleToRespawn(car[fbi6]);
         for(new i = 0; i < MAX_PLAYERS; i ++)
         {
		   if(PlayerInfo[i][pMember] == 2||PlayerInfo[i][pLeader] == 2)
		   {
                format(string, sizeof(string), " All faction cars have been respawned by Leader %s.", sendername);
                SCM(i,COLOR_LIGHTBLUE,string);
           }
   		 }
?!
Reply
#6

help me?!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)