SA-MP Forums Archive
[HELP]Gate problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP]Gate problem (/showthread.php?tid=71761)



[HELP]Gate problem - Frankox - 03.04.2009

Код:
//-----------------------------[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...


Re: [HELP]Gate problem - joco96 - 03.04.2009

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;
}



Re: [HELP]Gate problem - MenaceX^ - 03.04.2009

Code isn't returned.


Re: [HELP]Gate problem - Frankox - 03.04.2009

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...


Re: [HELP]Gate problem - RobertGraham - 03.04.2009

https://sampwiki.blast.hk/wiki/Automatic_Gates


Re: [HELP]Gate problem - Weed_ - 03.04.2009

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


Re: [HELP]Gate problem - MenaceX^ - 03.04.2009

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



Re: [HELP]Gate problem - joco96 - 03.04.2009

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.


Re: [HELP]Gate problem - Frankox - 03.04.2009

TEAM VIEWER:

ID: 248 075 569

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