SA-MP Forums Archive
Gates dont move at all - 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: Gates dont move at all (/showthread.php?tid=164415)



Gates dont move at all - x-unit - 31.07.2010

hi my prob is that my gates dont move when i send the command...

Код:
		if(strcmp(cmdtext, "/mansionopen", true) == 0)
    	{
        	new string[50];
        	new movetime = MoveObject(gate1, 1700.77, 2752.20, 10.83, 0.00); // Right Gate
	       	new movetime2 = MoveObject(gate2, 2000.06, 2752.20, 10.83, 0.00);// Left gate
        	format(string, sizeof(string), "Gate will open in %d milliseconds", movetime, movetime2);
        	SendClientMessage(playerid, 0xFF000000, string);
  		SendClientMessage(playerid, COLOR_WHITE, "Mansion opened!");
        	return 1;
 	}



Re: Gates dont move at all - willsuckformoney - 31.07.2010

https://sampforum.blast.hk/showthread.php?tid=159604


Re: Gates dont move at all - iggy1 - 31.07.2010

pawn Код:
if(strcmp(cmdtext, "/mansionopen", true) == 0)
{
            new string[50];
            new movetime = MoveObject(gate1, 1700.77, 2752.20, 10.83, 2.00); // Right Gate
            new movetime2 = MoveObject(gate2, 2000.06, 2752.20, 10.83, 2.00);// Left gate
            format(string, sizeof(string), "Gate will open in %d milliseconds", movetime, movetime2);
            SendClientMessage(playerid, 0xFF000000, string);
        SendClientMessage(playerid, COLOR_WHITE, "Mansion opened!");
            return 1;
    }
Indentation messed up u used code not [pawn] tags. u put speed as zero.


Re: Gates dont move at all - Cameltoe - 31.07.2010

Should use timers


Re: Gates dont move at all - Joe_ - 31.07.2010

Quote:
Originally Posted by Cameltoe
Посмотреть сообщение
Should use timers
Timers!? you mean one timer I hope.

EDIT: forgive me for not reading the wiki, it does return ms, sorry


Re: Gates dont move at all - iggy1 - 31.07.2010

u should change
pawn Код:
format(string, sizeof(string), "Gate will open in %d milliseconds", movetime, movetime2);
To
pawn Код:
format(string, sizeof(string), "Gate will open in %d milliseconds", movetime);
Only one placeholder, just spotted that


Re: Gates dont move at all - x-unit - 31.07.2010

ok gate finally open but....they dont close what is wrong?

Код:
		if(strcmp(cmdtext, "/mansionclose", true) == 0)
		{
            new string[50];
            new movetime = MoveObject(gate1, 1908.77, 2752.40, 10.83, 0.00);
            format(string, sizeof(string), "Gate will close in %d milliseconds", movetime);
            SendClientMessage(playerid, 0xFF000000, string);
        	SendClientMessage(playerid, COLOR_WHITE, "Mansion closed!");
            return 1;
		}



Re: Gates dont move at all - Vince - 31.07.2010

Yet again, you put speed as 0.00.


Re: Gates dont move at all - x-unit - 31.07.2010

lol you're right!! thnx

EDIT: yea its working thank you all