Object moving problem [+rep]
#1

Hi SA-MP Community,

I assembeld a ship with many parts like the hull, alfa objects, crates, ......... Now the deal is when a player calls for that ship from a dock, the ship must come to the player 5 meters away in one piece. Is it possible? If yes, show me how.
Reply
#2

You need to attach the parts to the ship

https://sampwiki.blast.hk/wiki/AttachObjectToObject
Reply
#3

Done that +reped. Now how to code for the ship to be some distance away from the player when called?
Reply
#4

You'd do something like
pawn Код:
CMD:callship(playerid, params[])
{
     if(IsPlayerInRangeOfPoint(playerid, DISTANCE, X, Y, Z))
     MoveObject(shipname, X, Y, Z, SPEED);
}
Reply
#5

Quote:
Originally Posted by Jack.7331
Посмотреть сообщение
You'd do something like
pawn Код:
CMD:callship(playerid, params[])
{
     if(IsPlayerInRangeOfPoint(playerid, DISTANCE, X, Y, Z))
     MoveObject(shipname, X, Y, Z, SPEED);
}
So what should be my X, Y, Z co-ordinates? The co-ordinate from where the player is calling?
Reply
#6

Quote:
Originally Posted by Faisal_khan
Посмотреть сообщение
So what should be my X, Y, Z co-ordinates? The co-ordinate from where the player is calling?
The First line, the XYZ lines are for the Location of where the player is calling, the MoveObject XYZ is for where the Ship would "row" to
Reply
#7

arghhh!!!
Код:
This forum requires that you wait 120 seconds between posts. Please try again in 8 seconds.
Then what about the DISTANCE?
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, DISTANCE, X, Y, Z))
Reply
#8

Quote:
Originally Posted by Faisal_khan
Посмотреть сообщение
arghhh!!!
Код:
This forum requires that you wait 120 seconds between posts. Please try again in 8 seconds.
Then what about the DISTANCE?
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, DISTANCE, X, Y, Z))
Meters away from the XYZ?
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
Reply
#9

Ok +reped you
Reply
#10

Quote:
Originally Posted by Faisal_khan
Посмотреть сообщение
Ok +reped you
Did it work?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)