SA-MP Forums Archive
What Did i do Wrong? Gates - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: What Did i do Wrong? Gates (/showthread.php?tid=342769)



What Did i do Wrong? Gates - miley1 - 15.05.2012

Those Gates wont move,

pawn Код:
if(!strcmp(cmdtext, "/go", true)) // By CuervO_HoMo
    {
        if(IsAPDMember(playerid) || IsAnNg(playerid) || IsAnFbi(playerid))
        {
            if (IsPlayerInRangeOfPoint(playerid, 10, -520.79998779297, -528.09997558594, 25.700000762939))
            {
                if(fPVDStatus == 0)
                {
                    MoveDynamicObject(fPVDoor, -520.79998779297, -526.29998779297, 25.700000762939, 0, 0, 270);
                    SendClientMessage(playerid, COLOR_LIGHTGREEN, "You have opened the Federal Prison vault gate.");
                    fPVDStatus = 1;
                }
                else if(fPVDStatus == 1)
                {
                    MoveDynamicObject(fPVDoor, -520.79998779297, -528.09997558594, 25.700000762939, 0, 0, 270);
                    SendClientMessage(playerid, COLOR_RED, "You have closed the Federal Prison vault gate.");
                    fPVDStatus = 0;
                }
            }
        }
Also There is

pawn Код:
fPVDoor = CreateDynamicObject(2634,253.1996,125.2256,1003.5666,0,0,90); //vault
And!

pawn Код:
new fPVDStatus = 0;
new fPVDoor;

Now Ma Problem Is the Gates wont Move Thats why i created this post Ofcourse ,
Maybe i did Copyd the wrong Cordinates?? Here are the gate Files so u may fix it for me [ Wouldt be very friendly and will be rewarded with reputation ]


This Is the Open One
http://www.solidfiles.com/d/fe3f37c4de/

And Here is The Closed One

http://www.solidfiles.com/d/68be57da19/


Anyway Thanks For reading Those poeple That wouldt like to help me Or toke his time to read this Thank you very much


Re: What Did i do Wrong? Gates - Yuryfury - 15.05.2012

Your coordinates for the created gate and the moved gate (as well as the IsPlayerInRangeOfPoint coordinates) are completely different...


Re: What Did i do Wrong? Gates - Neo Karls - 15.05.2012

Код:
	if(!strcmp(cmdtext, "/go", true)) // By CuervO_HoMo
	{
	    if(IsAPDMember(playerid) || IsAnNg(playerid) || IsAnFbi(playerid))
	    {
	        if (IsPlayerInRangeOfPoint(playerid, 10, -520.79998779297, -528.09997558594, 25.700000762939))
	        {
	            if(fPVDStatus == 0)
	            {
	            	MoveDynamicObject(fPVDoor, -520.79998779297, -526.29998779297, 25.700000762939, 0, 0, 270);
	            	SendClientMessage(playerid, COLOR_LIGHTGREEN, "You have opened the Federal Prison vault gate.");
	            	fPVDStatus = 1;
	            }
	            else if(fPVDStatus == 1)
	            {
	            	MoveDynamicObject(fPVDoor, -520.79998779297, -528.09997558594, 25.700000762939, 0, 0, 270);
	            	SendClientMessage(playerid, COLOR_RED, "You have closed the Federal Prison vault gate.");
	            	fPVDStatus = 0;
				}
			}
		}
Also There is

Код:
	fPVDoor = CreateDynamicObject(2634,253.1996,125.2256,1003.5666,0,0,90); //vault
And!

pawn Код:
new fPVDStatus = 0;
new fPVDoor;

Both are Different, check the script and Fix it ...


Re: What Did i do Wrong? Gates - john_jenkins - 15.05.2012

man you neeed to take New Gate System i was have you own it only object dont move


Re: What Did i do Wrong? Gates - miley1 - 15.05.2012

Quote:
Originally Posted by miley1
Посмотреть сообщение
Those Gates wont move,

pawn Код:
if(!strcmp(cmdtext, "/go", true)) // By CuervO_HoMo
    {
        if(IsAPDMember(playerid) || IsAnNg(playerid) || IsAnFbi(playerid))
        {
            if (IsPlayerInRangeOfPoint(playerid, 10, -520.79998779297, -528.09997558594, 25.700000762939))
            {
                if(fPVDStatus == 0)
                {
                    MoveDynamicObject(fPVDoor, -520.79998779297, -526.29998779297, 25.700000762939, 0, 0, 270);
                    SendClientMessage(playerid, COLOR_LIGHTGREEN, "You have opened the Federal Prison vault gate.");
                    fPVDStatus = 1;
                }
                else if(fPVDStatus == 1)
                {
                    MoveDynamicObject(fPVDoor, -520.79998779297, -528.09997558594, 25.700000762939, 0, 0, 270);
                    SendClientMessage(playerid, COLOR_RED, "You have closed the Federal Prison vault gate.");
                    fPVDStatus = 0;
                }
            }
        }
Also There is

pawn Код:
fPVDoor = CreateDynamicObject(2634, -520.79998779297, -528.09997558594, 25.700000762939, 0, 0, 270);
This One ^ Is Changed now But still aint Moving

pawn Код:
new fPVDStatus = 0;
new fPVDoor;

Now Ma Problem Is the Gates wont Move Thats why i created this post Ofcourse ,
Maybe i did Copyd the wrong Cordinates?? Here are the gate Files so u may fix it for me [ Wouldt be very friendly and will be rewarded with reputation ]


This Is the Open One
http://www.solidfiles.com/d/fe3f37c4de/

And Here is The Closed One

http://www.solidfiles.com/d/68be57da19/


Anyway Thanks For reading Those poeple That wouldt like to help me Or toke his time to read this Thank you very much
so pls help



This one is the new fPVDoor = CreateDynamicObject(2634, -520.79998779297, -528.09997558594, 25.700000762939, 0, 0, 270);


Re: What Did i do Wrong? Gates - miley1 - 15.05.2012

anyone ?