Gates dont move at all
#1

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;
 	}
Reply
#2

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

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.
Reply
#4

Should use timers
Reply
#5

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
Reply
#6

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
Reply
#7

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;
		}
Reply
#8

Yet again, you put speed as 0.00.
Reply
#9

lol you're right!! thnx

EDIT: yea its working thank you all
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)