Gate open / Close HELP!
#1

Don't tell me to go to Wiki or ****** because i went i worked with wiki steps and i hae 3 errors!

i Got these to gate objects:

CreateObject(987, 3180.2431640625, -1987.5537109375, 12.356931686401, 0.000000, 0.000000, 269); // [closed]



CreateObject(987, 3180.1784667969, -1998.6683349609, 12.26300239563, 0.000000, 0.000000, 269); // [open]

this is the link : https://sampwiki.blast.hk/wiki/MoveObject

can some one help me because i still get errors?
Reply
#2

Place below "#include <a_samp>"

Код:
new Gate1;
Place in "public OnGameModeInit()"

Код:
CreateObject(987, 3180.2431640625, -1987.5537109375, 12.356931686401, 0.000000, 0.000000, 269); // [closed]
Place in "public OnPlayerCommandText(playerid, cmdtext[])"

Код:
if (strcmp("/gate", cmdtext, true, 10) == 0)
	{
    if (gate == 0)
    {
		MoveObject(Gate1, 3180.2431640625, -1987.5537109375, 12.356931686401, 4.5000);
		gate=1;
		}else{
		MoveObject(Gate1, 3180.1784667969, -1998.6683349609, 12.26300239563, 4.5000);
		gate=0;
		return 1;
	}
	}
That will get the job done.
Reply
#3

Quote:
Originally Posted by Ma
Place below "#include <a_samp>"

Код:
new Gate1;
Place in "public OnGameModeInit()"

Код:
CreateObject(987, 3180.2431640625, -1987.5537109375, 12.356931686401, 0.000000, 0.000000, 269); // [closed]
Place in "public OnPlayerCommandText(playerid, cmdtext[])"

Код:
if (strcmp("/gate", cmdtext, true, 10) == 0)
	{
    if (gate == 0)
    {
		MoveObject(Gate1, 3180.2431640625, -1987.5537109375, 12.356931686401, 4.5000);
		gate=1;
		}else{
		MoveObject(Gate1, 3180.1784667969, -1998.6683349609, 12.26300239563, 4.5000);
		gate=0;
		return 1;
	}
	}
That will get the job done.
Thanks ill try this out
Reply
#4

LoL Wrong COde

Reply
#5

Quote:
Originally Posted by Ma
Посмотреть сообщение
Place below "#include <a_samp>"

Код:
new Gate1;
Place in "public OnGameModeInit()"

Код:
Gate1 = CreateObject(987, 3180.2431640625, -1987.5537109375, 12.356931686401, 0.000000, 0.000000, 269); // [closed]
Place in "public OnPlayerCommandText(playerid, cmdtext[])"

Код:
if (strcmp("/gate", cmdtext, true, 10) == 0)
	{
    if (gate == 0)
    {
		MoveObject(Gate1, 3180.2431640625, -1987.5537109375, 12.356931686401, 4.5000);
		gate=1;
		}else{
		MoveObject(Gate1, 3180.1784667969, -1998.6683349609, 12.26300239563, 4.5000);
		gate=0;
		return 1;
	}
	}
That will get the job done.
you forgot to assign variable
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)