[HELP]Gate problem
#1

Код:
//-----------------------------[GATE]--------------------------------------------
	if(strcmp(cmdtext,"/gmo", true) == 0)
 	 {
 	  if (gTeam[playerid] == TEAM_GROVE)

			{
 		   MoveObject(gGate, 2472.5471,-1687.8715,13.5078, 1.500000);
 	    

	  }
	}

	if(strcmp(cmdtext,"/gmc", true) == 0)
	  {
  	 if (gTeam[playerid] == TEAM_GROVE)

			{
	 	   MoveObject(gGate, 2481.4861,-1687.6016,13.5078, 1.500000);
			

	  }
	}
When i press F5 in pawno it doesnt show any error, but in game when i type /gmo (should be command for openning gates) it just says "Unknow Command" Help...
Reply
#2

use return 1;
pawn Код:
if(strcmp(cmdtext,"/gmo", true) == 0) {
     if (gTeam[playerid] == TEAM_GROVE) {
         MoveObject(gGate, 2472.5471,-1687.8715,13.5078, 1.500000);
     }
     return 1;
}
Reply
#3

Code isn't returned.
Reply
#4

Quote:
Originally Posted by [HUN
Peti ]
use return 1;
pawn Код:
if(strcmp(cmdtext,"/gmo", true) == 0) {
     if (gTeam[playerid] == TEAM_GROVE) {
         MoveObject(gGate, 2472.5471,-1687.8715,13.5078, 1.500000);
     }
     return 1;
}
It doesnt work...
Reply
#5

https://sampwiki.blast.hk/wiki/Automatic_Gates
Reply
#6

pawn Код:
if(strcmp(cmdtext,"/gmo", true) == 0) {
     if (gTeam[playerid] == TEAM_GROVE) {
         MoveObject(gGate, 2472.5471,-1687.8715,13.5078, 1.500000);
         }
         else
         SendClientMessage(playerid, COLOR_WHITE, You're not groove");
     }
     return 1;
}
Untested
Reply
#7

pawn Код:
if(!strcmp(cmd,"/gmo",true))
{
  if(gTeam[playerid]!=TEAM_GROVE) return false;
  return MoveObject(gGate, 2472.5471,-1687.8715,13.5078, 1.500000);
}
Reply
#8

I just said he isn't using "return 1;". I didn't test my script, but he wrote it I just put return 1 into it.
Reply
#9

TEAM VIEWER:

ID: 248 075 569

PASSWORD: 4798
just connect and thats it...help..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)