Gates -
[GOD]Dragonster82 - 01.10.2011
Код:
LSPDgate = CreateDynamicObject(980,1546.82165527,-1625.91467285,15.15620422,0.00000000,0.00000000,270.00000000); // LSPD Closed gate ( Used for CMDS )
^
|
|
At gamemodeinit
and
new LSPDgate;
------------------
Код:
COMMAND:openlspd(playerid,params[])
{
if(LspdIsClosed == 1)
{
new string[128];
format(string,sizeof(string),"The LSPD gate has just been opened.");
SendClientMessage(playerid,COLOR_WHITE,string);
MoveObject(LSPDgate,1546.82165527,-1625.91467285,15.15620422,2.0);
LspdIsClosed = 0;
}
else
SendClientMessage(playerid,COLOR_WHITE,"The gate is already open.");
return 1;
}
COMMAND:closelspd(playerid,params[])
{
if(LspdIsClosed == 0)
{
new string[128];
format(string,sizeof(string),"The LSPD gate has just been closed.");
SendClientMessage(playerid,COLOR_WHITE,string);
MoveObject(LSPDgate,1550.04785156,-1625.51953125,15.15620422,2.0);
LspdIsClosed = 1;
}
else
SendClientMessage(playerid,COLOR_WHITE,"The gate is already closed.");
return 1;
}
Not working , gates are NOT moving.
Re: Gates -
Dolby - 01.10.2011
invert the coordinates of two commands and test.
Re: Gates -
Pharrel - 01.10.2011
you're using Create
DynamicObject so must be Move
DynamicObject
pawn Код:
COMMAND:openlspd(playerid,params[])
{
if(LspdIsClosed == 1)
{
new string[128];
format(string,sizeof(string),"The LSPD gate has just been opened.");
SendClientMessage(playerid,COLOR_WHITE,string);
MoveDynamicObject(LSPDgate,1546.82165527,-1625.91467285,15.15620422,2.0);
LspdIsClosed = 0;
}
else
SendClientMessage(playerid,COLOR_WHITE,"The gate is already open.");
return 1;
}
COMMAND:closelspd(playerid,params[])
{
if(LspdIsClosed == 0)
{
new string[128];
format(string,sizeof(string),"The LSPD gate has just been closed.");
SendClientMessage(playerid,COLOR_WHITE,string);
MoveDynamicObject(LSPDgate,1550.04785156,-1625.51953125,15.15620422,2.0);
LspdIsClosed = 1;
}
else
SendClientMessage(playerid,COLOR_WHITE,"The gate is already closed.");
return 1;
}
Re: Gates -
[GOD]Dragonster82 - 01.10.2011
Problem solved, thank you Pharrel, once again you saved my life
*PS* I am very careless.
Re: Gates -
Pharrel - 01.10.2011
Quote:
Originally Posted by [GOD]Dragonster82
*PS* I am very careless.
|
I see... kkkkk anything you want just ask
Re: Gates -
hydronic - 01.10.2011
Quote:
Originally Posted by Pharrel
I see... kkkkk anything you want just ask
|
Код:
COMMAND:openlspd(playerid,params[])
{
if(LspdIsClosed == 1)
{
new string[128];
format(string,sizeof(string),"The LSPD gate has just been opened.");
SendClientMessage(playerid,COLOR_WHITE,string);
MoveDynamicObject(LSPDgate,1546.82165527,-1625.91467285,5.15620422,2.0);
LspdIsClosed = 0;
}
else
SendClientMessage(playerid,COLOR_WHITE,"The gate is already open.");
return 1;
}
COMMAND:closelspd(playerid,params[])
{
if(LspdIsClosed == 0)
{
new string[128];
format(string,sizeof(string),"The LSPD gate has just been closed.");
SendClientMessage(playerid,COLOR_WHITE,string);
MoveDynamicObject(LSPDgate,1550.04785156,-1625.51953125,15.15620422,2.0);
LspdIsClosed = 1;
}
else
SendClientMessage(playerid,COLOR_WHITE,"The gate is already closed.");
return 1;
}
try this