Gates Help
#1

SO I did a tutorial on how to make moving gates. Here is what I came up with:

Код:
#define FILTERSCRIPT
#include <a_samp>
#include <EasyNames>

public OnFilterScriptInit()
{
	{
	CreateObject(987,1006.49169922,-2104.39648438,12.14295101,0.00000000,0.00000000,158.46972656);
	CreateObject(975,1000.75781250,-2218.58496094,13.76844025,0.00000000,0.00000000,190.24475098); 
	}
}

public OnPlayerCommandText(playerid, cmdtext[])
{
  if(strcmp(cmdtext,"/openmaingate", true) == 0)
		  {
		   if(PlayerNameIs(playerid, "Chicken0895"))
		   {                                               
				 if(IsPlayerInRangeOfPoint(15.0, playerid,1002.49169922,-2106.39648438,14.14295101))
				 {                                                             // |
		 	   		MoveObject(987, 1006.49169922,-2104.39648438,6.14295101, 1.500000);  
		     		return 1;
		     }    
		  }                                                                         
		}                                                                           
  if(strcmp(cmdtext,"/closemaingate", true) == 0)
		  {                                                                            
  	 	if(PlayerNameIs(playerid, "Chicken0895"))
		   {                                                                             
				 if(IsPlayerInRangeOfPoint(15.0, playerid,1002.49169922,-2106.39648438,14.14295101))
				 {
		 	   MoveObject(987, 1006.49169922,-2104.39648438,12.14295101, 1.500000);
		 	   return 1;
			}
		  }
	}
}
It does not work. When I use the commands I get "unknown command". I don't know if it is relevant, but when I unloaded the fs via rcon, the gates stayed where they were.

Any help would be greatly appreciated. And yes, I made sure my name was Chicken0895.
Reply


Messages In This Thread
Gates Help - by Chicken0895 - 02.08.2011, 00:15
Re: Gates Help - by Basicz - 02.08.2011, 01:03
Re: Gates Help - by Chicken0895 - 02.08.2011, 01:07
Re: Gates Help - by =WoR=Varth - 02.08.2011, 01:16
Re: Gates Help - by Basicz - 02.08.2011, 01:22
Re: Gates Help - by Chicken0895 - 02.08.2011, 01:38

Forum Jump:


Users browsing this thread: 1 Guest(s)