03.08.2010, 08:00
(
Последний раз редактировалось Simon; 03.08.2010 в 08:08.
Причина: Tidied up a bit.
)
I believe you have to attach objects when a player is streamed in.
You have your offsets as the players position; they are 'offsets' not positions, which means the bag is put at co-ordinates (player_x + x_offset, player_y + y_offset, player_z + z_offset). Right now your offsets are the co-ordinates which means the bag is set at the co-ordinates (player_x + player_x, player_y + player_y, player_z + player_z)
You'll also want to change the offset used in your command as well.
You have your offsets as the players position; they are 'offsets' not positions, which means the bag is put at co-ordinates (player_x + x_offset, player_y + y_offset, player_z + z_offset). Right now your offsets are the co-ordinates which means the bag is set at the co-ordinates (player_x + player_x, player_y + player_y, player_z + player_z)
pawn Код:
public OnPlayerStreamIn(playerid, forplayerid)
{
new
bagObject = GetPVarInt(playerid, "bag");
if (bagObject)
AttachObjectToPlayer(bagObject, playerid, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0);
return 1;
}