Gates aint moving
#1

This is moving Gate
Quote:

if(!strcmp(cmdtext, "/go", true)) // By CuervO
{
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;
}
}
}

Quote:

new fPVDStatus = 0;
new fPVDoor;

Quote:

// FEDERAL PRISON
fPVDoor = CreateDynamicObject(2634, -520.79998779297, -528.09997558594, 25.700000762939, 0, 0, 270);

How to fix
Reply
#2

do you get errors on this?
pawn Код:
if(!strcmp(cmdtext, "/go", true)) // By CuervO
{
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;
}
}
}
Reply
#3

no because it shouldt be like this but i just posted the thing i scripted into it
Quote:

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;
}
}
}



if(IsAPDMember(playerid) || IsAFreecop(playerid))
{
if (IsPlayerInRangeOfPoint(playerid, 15,1589.053344,-1638.123168,14.122960))
{
if(lspdg == 1) { SendClientMessage(playerid, COLOR_GREY, "** Gate is Already Opened"); return 1; }
MoveDynamicObject(pdgate1,1599.053344,-1638.123168,14.122960, 0.;
SetTimer("GateClose", 12000, 0);
SendClientMessage(playerid, COLOR_BLUE,"A garage is opened and will close in 7 seconds.");
format(string, sizeof(string), "* %s takes his/her remote and opens a garage.", sendername);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,CO LOR_CHAT5);
PlayerPlaySound(playerid, 1153, 1589.053344,-1638.123168,14.122960);
lspdg = 1;
}
else if (IsPlayerInRangeOfPoint(playerid, 15,1544.700317,-1630.735717,13.096980))
{
if(lspdg2 == 1) { SendClientMessage(playerid, COLOR_GREY, "** Barrier is Already Opened"); return 1; }
DestroyDynamicObject( pdgate2 );
pdgate3 = CreateDynamicObject(968,1544.700317,-1630.735717,12.924660,0.000000,0.000000,270.972869 );
SetTimer("GateClose5", 6000, 0);
SendClientMessage(playerid, COLOR_BLUE,"The gate is opened and will close in 6 seconds.");
format(string, sizeof(string), "* %s takes his/her remote and opens the gate.", sendername);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,CO LOR_CHAT5);
lspdg2 = 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY,"* Not near a Gate that you can use.");
return 1;
}
}
else if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
{
if (IsPlayerInRangeOfPoint(playerid, 15,2720.3772,-2409.7523,12.6))
{
if(armyg == 1) { SendClientMessage(playerid, COLOR_GREY, "** Gate is Already Opened"); return 1; }
MoveDynamicObject(armygate1,2720.3772, -2401.2523, 12.6, 3.5);
SetTimer("GateClose2", 7000, 0);
SendClientMessage(playerid, COLOR_BLUE,"The Army gate Nr. 1 is opened and will close in 7 seconds.");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s takes his/her remote and opens the army gate #1.", sendername);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,CO LOR_CHAT5);
armyg = 1;
}
else if (IsPlayerInRangeOfPoint(playerid, 15,2720.3772,-2508.3069,12.6))
{
if(armyg2 == 1) { SendClientMessage(playerid, COLOR_GREY, "** Gate is Already Opened"); return 1; }
MoveDynamicObject(armygate2,2720.3772, -2499.8069, 12.6, 3.5);
SetTimer("GateClose2", 7000, 0);
SendClientMessage(playerid, COLOR_BLUE,"The Army gate Nr. 2 is opened and will close in 7 seconds.");

format(string, sizeof(string), "* %s takes his/her remote and opens the army gate #2.", sendername);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,CO LOR_CHAT5);
armyg2 = 1;
}
else if(IsPlayerInRangeOfPoint(playerid, 10, 2773.2056,-2494.8267,13.6681))
{
if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
{
if(PlayerInfo[playerid][pRank] >= 5)
{
MoveDynamicObject(armygate3, 2774.4670,-2494.5842,8.2665, 2.5);
SetTimer("GateClose2", 7000, 0);
SendClientMessage(playerid, COLOR_BLUE,"The gate is opened and will close in 7 seconds.");

format(string, sizeof(string), "* %s takes his/her remote and opens Rhino Gate.", sendername);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,CO LOR_CHAT5);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY,"* Not near a Gate that you can use.");
return 1;
}
}
else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
{
if (IsPlayerInRangeOfPoint(playerid, 15,1473.0992,-1496.9677,15.3232))
{
if(fbig2 == 1) { SendClientMessage(playerid, COLOR_GREY, "** Gate is Already Opened"); return 1; }
MoveDynamicObject(fbigate2,1473.0992,-1496.9677,5.3232, 1.5);
SetTimer("GateClose3", 7000, 0);
SendClientMessage(playerid, COLOR_BLUE,"FBI gate is opened and will close in 7 seconds.");

format(string, sizeof(string), "* %s takes his/her remote and opens fbi gate.", sendername);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,CO LOR_CHAT5);
fbig2 = 1;
}
else if (IsPlayerInRangeOfPoint(playerid, 15,1534.9020,-1451.5979,14.4882))
{
if(fbig == 1) { SendClientMessage(playerid, COLOR_GREY, "** Gate is Already Opened"); return 1; }
MoveDynamicObject(fbigate,1534.9020,-1451.5979,5.4882, 1.5);
SetTimer("GateClose3", 7000, 0);
SendClientMessage(playerid, COLOR_BLUE,"FBI gate is opened and will close in 7 seconds.");

format(string, sizeof(string), "* %s takes his/her remote and opens fbi gate.", sendername);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,CO LOR_CHAT5);
fbig = 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY,"* Not near a Gate that you can use.");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY,"* You don't have a remote control.");
return 1;
}
return 1;
}

Reply
#4

I cant really see whats going on in your script. try using instead of
Код:
code
and copy right from your script so it looks more like a script.

Remember to put large scripts in
pawn Код:
code
Reply
#5

the gates you dont move it says you opend it but it doesnt move
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)