Gates is not moving.
#1

Hi,

Why my gates is not moving?

Код:
new GANGGATES;
In top of my gamemode.

OnGameModeInit

Код:
GANGGATES = CreateObject(2990,-2127.19995117,-80.90000153,38.20000076,0.00000000,0.00000000,180.000000); //object(wongs_gate) (1)
Код:
if( PRESSED( KEY_YES ) )
	{
	   
	    if( IsPlayerInRangeOfPoint( playerid, 3.0, -2133.19995117,-80.30000305,36.00000000 ) || IsPlayerInRangeOfPoint( playerid, 3.0, -2121.00000000,-81.40000153,36.00000000 )  )
	    {
	        ShowPlayerDialog(playerid,50,DIALOG_STYLE_LIST,"GATES CONTROL","OPEN\nCLOSE","OK","QUIT");
	    }
	}
When i press y i get this dialog.

OnDialogResponse

Код:
if( dialogid == 50 )
	{
	    if( response )
	    {
	        switch( listitem )
	        {
	            case 0:
	            {
	                SendClientMessage( playerid, COLOR_GREEN,"* GATES OPENING.");
	                MoveObject( GANGGATES,-2117.1999511719,-80.90000153,38.20000076, 7.0 );
	            }
	            case 1:
	            {
	                MoveObject( GANGGATES,-2127.1999511719,-80.90000153,38.20000076, 7.0 );
	            }
	        }
	    }
	    return 1;
	}
I get this meessage "GATES OPENING", but gates don't move in any side, but how you see X coord is difference.

I have about 700 objects created with CreateObject. When i move others objects they are move well.
Reply
#2

pawn Код:
if( dialogid == 50 )
    {
        if( response )
        {
            switch( listitem )
            {
                case 0:
                {
                    SendClientMessage( playerid, COLOR_GREEN,"* GATES OPENING.");
                    MoveObject( GANGGATES,-2117.1999511719,-80.90000153,38.20000076, 7.0 );//the same
                }
                case 1:
                {
                    MoveObject( GANGGATES,-2127.1999511719,-80.90000153,38.20000076, 7.0 );//the same lol
                }
            }
        }
        return 1;
    }
you have repeated the same coords
Reply
#3

Код:
-2117.1999511719
               
-2127.19
Here is not same. And i try to change z coordinates it's still same.
Reply
#4

try Using
CreateDynamicObject and MoveDynamicObject ..
Reply
#5

But i want with CreateObject, and MoveObject. Because streamer use a lot of CPU and resources use a lot of. But others object moving well, why this don't move?
Reply
#6

Quote:
Originally Posted by budelis
Посмотреть сообщение
Hi,

Why my gates is not moving?

Код:
new GANGGATES;
In top of my gamemode.

OnGameModeInit

Код:
GANGGATES = CreateObject(2990,-2127.19995117,-80.90000153,38.20000076,0.00000000,0.00000000,180.000000); //object(wongs_gate) (1)
Код:
if( PRESSED( KEY_YES ))
	{
	   
	    if( IsPlayerInRangeOfPoint( playerid, 3.0, -2133.19995117,-80.30000305,36.00000000 ) || IsPlayerInRangeOfPoint( playerid, 3.0, -2121.00000000,-81.40000153,36.00000000 )  )
	    {
	        ShowPlayerDialog(playerid,50,DIALOG_STYLE_LIST,"GATES CONTROL","OPEN\nCLOSE","OK","QUIT");
	    }
	}
When i press y i get this dialog.

OnDialogResponse

Код:
if( dialogid == 50 )
	{
	    if( response )
	    {
	        switch( listitem )
	        {
	            case 0:
	            {
	                SendClientMessage( playerid, COLOR_GREEN,"* GATES OPENING." );
	                MoveObject( GANGGATES,-2117.1999511719,-80.90000153,38.20000076, 7.0 );
	            }
	            case 1:
	            {
	                MoveObject( GANGGATES,-2127.1999511719,-80.90000153,38.20000076, 7.0 );
	            }
	        }
	    }
	    return 1;
	}
I get this meessage "GATES OPENING", but gates don't move in any side, but how you see X coord is difference.

I have about 700 objects created with CreateObject. When i move others objects they are move well.
Try with this code

Код:
if(PRESSED(KEY_YES))
	{
	   
	    if(IsPlayerInRangeOfPoint(playerid, 3.0, -2133.19995117,-80.30000305,36.00000000) || IsPlayerInRangeOfPoint(playerid, 3.0, -2121.00000000,-81.40000153,36.00000000))
	    {
	        ShowPlayerDialog(playerid,50,DIALOG_STYLE_LIST,"GATES CONTROL","OPEN\nCLOSE","OK","QUIT");
	    }
	}


Код:
if(dialogid == 50)
	{
	    if(response)
	    {
	        switch(listitem)
	        {
	            case 0:
	            {
	                SendClientMessage(playerid, COLOR_GREEN,"* GATES OPENING.");
	                MoveObject(GANGGATES,-2117.1999511719,-80.90000153,38.20000076, 7.0);
	            }
	            case 1:
	            {
	                MoveObject(GANGGATES,-2127.1999511719,-80.90000153,38.20000076, 7.0);
	            }
	        }
	    }
	    return 1;
	}
Reply
#7

Try using MoveDynamicObject by the latest streamer plugin and widen the coordinates and it MAYBE work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)