Gate problem
#1

I have a gate that i made to test the open/close function. But the commands dont make it move. Help please if you can.

top of script
Код:
new brandongate1;
public OnGameModeInit()
Код:
brandongate1 = CreateObject(969, 1530.947265625, 96.14453125, 28.636119842529, 0, 0, 25.801391601563);
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(!strcmp(cmdtext,"/opengate",true))//Will open your gates
	{
  MoveObject(brandongate1, 1538.9044189453, 100.001953125, 28.584012985229, 2.5);
  return 1;
	}
	if(!strcmp(cmdtext,"/closegate",true))//Will close your gates
	{
  MoveObject(brandongate1, 1530.947265625, 96.14453125, 28.636119842529, 2.5);
  return 1;
	}
  return 0;
}
Reply
#2

the code is fine idk why it doesnt move but u can try agate generator it might help u (my attachements)
V
V
V
V
V
V
________
Starcraft Replays Terran
Reply
#3

hmmm that didnt work either. should i try in a filterscritp?
Reply
#4

Код:
[#include <a_samp>

new Brandongate1;

public OnFilterScriptInit()
{
Brandongate1 = CreateObject(969, 1530.947265625, 96.14453125, 28.636119842529, 0, 0, 25.801391601563);
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/opengate", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 5, 1530.947265625, 96.14453125, 28.636119842529))
{
MoveObject(Brandongate1, 1538.9044189453, 100.001953125, 28.584012985229, 2);
SendClientMessage(playerid, 0xFFFFFF, "You've opened Brandon's House gate");
}
return 1;
}
if (strcmp("/closegate", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 5, 1530.947265625, 96.14453125, 28.636119842529))
{
MoveObject(Brandongate1, 1530.947265625, 96.14453125, 28.636119842529, 2);
SendClientMessage(playerid, 0xFFFFFF, "You've closed Brandon's House gate");
}
return 1;
}
return 0;
}

/code]

that is the whole filterscript made by agate generator
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)