#1

Код:
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.
Reply
#2

invert the coordinates of two commands and test.
Reply
#3

you're using CreateDynamicObject so must be MoveDynamicObject

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

Problem solved, thank you Pharrel, once again you saved my life

*PS* I am very careless.
Reply
#5

Quote:
Originally Posted by [GOD]Dragonster82
Посмотреть сообщение
*PS* I am very careless.
I see... kkkkk anything you want just ask
Reply
#6

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)