SA-MP Forums Archive
Gate Help - 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: Gate Help (/showthread.php?tid=407253)



Gate Help - WiseRice - 13.01.2013

im using ravens roleplay i changing fbi gates around and when i changed the gates open but not close can someone help


Re: Gate Help - EAsT-OAK_510 - 13.01.2013

Post code.


Re: Gate Help - geohareas - 13.01.2013

There must be a timer,moving back the object..In my opinion,you changed the first location,where you just move it down.When you want to move it up,it is moved back to the first location (I guess that you changed the location of the FBI Base).


Re: Gate Help - WiseRice - 13.01.2013

This is under the command /go
Quote:

else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
{
if (IsPlayerInRangeOfPoint(playerid, 15,-2696.60,-43.57,7.25))
{
if(fbig == 1) { SendClientMessage(playerid, COLOR_GREY, "** Gate is Already Opened"); return 1; }
MoveDynamicObject(fbigate,-2696.60,-43.57,7.25, 2.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;
}

This is under onplayerkeystatechange all i did is move cordinates i dont know what happen
Quote:

else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
{
if (IsPlayerInRangeOfPoint(playerid, 15,-2696.60,-43.57,7.25))
{
if(fbig == 1) { SendClientMessage(playerid, COLOR_GREY, "** Gate is Already Opened"); return 1; }
MoveDynamicObject(fbigate,-2696.60,-43.57,-0.71, 2.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;
}
}




Re: Gate Help - geohareas - 13.01.2013

Ravens RolePlay,even its an really diffucult Gamemode,and not for begginers but,search on your script for "GateClose3" and share here everything you find.