Moving Bridge and HD Roads Texture Mods

Started by Clucker, June 27, 2016, 01:25

Clucker

Does someone know what method used in making the bridges move downside when a player is near? Please give me some hints not the exact code. I am now scripting my map :D thanks

second, is there an easy way to install HD roads mod? or do i really need to replace the texture 1 by 1 using img tool in gta3.img? if there is, can someone please post it's link here :D thanks

P.S. i tried some algorithms but that's not the actually i need and i want...


Ethan

for the bridge, you should look up how to make a gate.. same concept there for both.... layers approaches, bridge goes down and or gate for, lets say a house, goes down..

for the HD roads, there are some on gtainside and they are all included for the specific area IE LS, LV, SF, Country.

Clucker

Okay i need help now hahaha im having a headache... i've been configuring this codes for about 2 hours.. all i want is to move the bridge whenever a player comes nearly and comes back to it's position after the player left or passes by...

Here's my code : http://pastebin.com/DiiSAdFt

CarlJohnson

"ERROR, PASTE ID IS INVALID, OR PASTE HAS BEEN REMOVED"
LAST SEEN
TOTAL TIME ON SERVER
SCORE
TRUCK LOADS
CONVOY SCORE
ACHIEVEMENTS
ARTIC
DUMPER
VAN
FUEL
CEMENT
ARRESTS
CARS STOLEN
COACH
PLANE
HELICOPTER
TOW TRUCK
LIMO
TRASH
ARMORED VAN

Dobby

Streamer plugin, create a dynamic area. Use the relevant onplayerenterdynamicarea callback. Move Z to where you want it to be (down), once they've left the area move it back (up)
Quote from: mick88 on May 24, 2015, 21:39
FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK! FUCK!

CarlJohnson

I'll explain how it works, you can do what dobby told you or otherwise you can use IsPlayerInRangeOfPoint to see If the player is near the bridge, then use MoveObject to move the bridge accordingly

You can look at this topic for reference, works the same way but use bridge instead of gate
http://www.forum.convoytrucking.net/index.php?topic=27813.msg148525#msg148525
LAST SEEN
TOTAL TIME ON SERVER
SCORE
TRUCK LOADS
CONVOY SCORE
ACHIEVEMENTS
ARTIC
DUMPER
VAN
FUEL
CEMENT
ARRESTS
CARS STOLEN
COACH
PLANE
HELICOPTER
TOW TRUCK
LIMO
TRASH
ARMORED VAN

Clucker

Quote from: CarlJohnson on June 27, 2016, 10:26
I'll explain how it works, you can do what dobby told you or otherwise you can use IsPlayerInRangeOfPoint to see If the player is near the bridge, then use MoveObject to move the bridge accordingly

You can look at this topic for reference, works the same way but use bridge instead of gate
http://www.forum.convoytrucking.net/index.php?topic=27813.msg148525#msg148525

That's what i used.... first, creation of bridge first on PublicGameModeInit(), then second is IsPlayerInRangeOfPoint to check if player is near so if there is approaching player who entered the point the bridge will move down in around 5,000 milliseconds ... but i tried lol and didn't work...

Clucker

Quote from: CarlJohnson on June 27, 2016, 10:26
I'll explain how it works, you can do what dobby told you or otherwise you can use IsPlayerInRangeOfPoint to see If the player is near the bridge, then use MoveObject to move the bridge accordingly

You can look at this topic for reference, works the same way but use bridge instead of gate
http://www.forum.convoytrucking.net/index.php?topic=27813.msg148525#msg148525

Looks like this algorithm is easier... i will try it later and update you what i found :D i'll just still try to keep going on what i started before starting on new codes/process :D :like:

CarlJohnson

MoveObject(bridge, 3079.1423, 264.0868, 39.5620, 5); //final: bridge will go up again
You have declared the bridge after you have forwarded the close()
It should be
public OnGameModeInit()
{
CreateDynamicObject(5333,-3211.7009300,264.0425100,12.8949000,0.0000000,0.0000000,180.0000000); //
CreateDynamicObject(9838,-3097.7165500,271.6612500,14.9262000,0.0000000,0.0000000,90.0000000); //
CreateDynamicObject(9690,-3097.8007800,256.5354300,14.9298000,0.0000000,0.0000000,90.0000000); //

bridge = CreateDynamicObject(18788,-3079.1423300,264.0867900,39.5620,0.0000000,0.0000000,0.0000000);
.
.
.
}

forward close ();
public close()
{
MoveObject(bridge, 3079.1423, 264.0868, 39.5620, 5); //final: bridge will go up again
return 1;
}


Atleast that's what I think :P
LAST SEEN
TOTAL TIME ON SERVER
SCORE
TRUCK LOADS
CONVOY SCORE
ACHIEVEMENTS
ARTIC
DUMPER
VAN
FUEL
CEMENT
ARRESTS
CARS STOLEN
COACH
PLANE
HELICOPTER
TOW TRUCK
LIMO
TRASH
ARMORED VAN

Clucker

There was another mistake on that code that i posted in paste bin... i didn't include the IsPlayerInRangePoint under the function of OnPlayerUpdate().. i forgot to include it in pastebin lol... should the forward close be after OnPlayerUpdate() or i'll do what you say? :)

CarlJohnson

#include <a_samp>
#include <foreach>

new Bridge;
forward Timer();
forward BridgeDown();

main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
Bridge = CreateObject(....);
return 1;
}

public OnPlayerConnect(playerid)
{
SetTimer("Timer", 1000, 1);
return 1;
}

public Timer()
{
    for(new i=0; i<MAX_PLAYERS; i++)
{
    if(IsPlayerConnected(i))
{
    if(IsPlayerInRangeOfPoint(i, 5, x_coord, y_coord, z_coord))
{
    MoveObject(Bridge, x_coord, y_coord, z_coord, speed);
    SetTimer("BridgeDown", 5000, 0);
    return 1;
    }
}
}
}

public BridgeDown()
{
    MoveObject(Bridge, x_coord, y_coord, z_coord, speed);
    return 1;
}
LAST SEEN
TOTAL TIME ON SERVER
SCORE
TRUCK LOADS
CONVOY SCORE
ACHIEVEMENTS
ARTIC
DUMPER
VAN
FUEL
CEMENT
ARRESTS
CARS STOLEN
COACH
PLANE
HELICOPTER
TOW TRUCK
LIMO
TRASH
ARMORED VAN

Clucker


Ethan


Clucker

i forgot lol because of programming -_-