Faction gate error.Help
#1

can someone help me please.Can you fix this so only NG can open the gate please



if (strcmp("/fortopen", cmdtext, true, 10) == 0)
{
if(faction[playerid] == 3); //This is the Army faction--the faction id 3.I want it so only The NG can open the gate
{
MoveObject(fortgate1,-1218.4169921875,-1065.1713867188,129.09060668945,3.0);
MoveObject(fortgate2,-1196.1612548828,-1064.8914794922,129.13668823242,3.0);
return 1;
}
else return SendClientMessage(playerid,-1,"You are not NG!");
}
if (strcmp("/fortclose", cmdtext, true, 10) == 0)
{
if(pfaction[playerid] == 3);
{
MoveObject(fortgate1,-1211.1669921875,-1065.072265625,129.09060668945,3.0);
MoveObject(fortgate2,-1203.212890625,-1064.9228515625,129.13668823242,3.0);
return 1;
}
else return SendClientMessage(playerid,-1,"You are not NG!");
}




I'm getting errors
error 017: undefined symbol "faction"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
invalid expression, assumed zero
too many error messages on one line
Please can someone fix this.
Thanks
Reply
#2

pawn Код:
if (strcmp("/fortopen", cmdtext, true, 10) == 0)
   {
       if(pfaction[ playerid ] == 5)
       {
              MoveObject( fortgate1, -1218.4169, -1065.1713, 129.0906, 3.0 );
              MoveObject( fortgate2, -1196.1612, -1064.8914, 129.1366, 3.0 );
              return 1;
       }
       else return SendClientMessage( playerid, -1, "You are not NG!" );
   }
   if (strcmp("/fortclose", cmdtext, true, 10) == 0)
   {
      if( pfaction[ playerid ] == 5 )
      {
             MoveObject(fortgate1,-1211.1669,-1065.0722,129.0906,3.0);
             MoveObject(fortgate2,-1203.2128,-1064.9228,129.1366,3.0);
             return 1;
      }
      else return SendClientMessage(playerid,-1,"You are not NG!");
    }
See if this way works.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)