player.Angle Set To Object angle

Started by Zone_Killer, Aug 16, 2017, 04:00 PM

Previous topic - Next topic

Zone_Killer

Add Object Command:
if(cmd == "createobject") {CreateObject( 500, 1, Vector( player.Pos.x, player.Pos.y, player.Pos.z), 255 ).RotateByEuler( Vector( 3.14159, 3.14159, 0.618407), 0); }
but i want When i use /createobject command so player angle automatically set to object angle

player.Angle = object.RotationEuler;
but its not working

Sorry For My Bad English :(


Bohemia Is God Of Punjabi Rap
Yo Yo Honey Singh tou chutiya hai

EK.IceFlake

Quote from: Zone_Killer on Aug 16, 2017, 04:00 PMAdd Object Command:
if(cmd == "createobject") {CreateObject( 500, 1, Vector( player.Pos.x, player.Pos.y, player.Pos.z), 255 ).RotateByEuler( Vector( 3.14159, 3.14159, 0.618407), 0); }
but i want When i use /createobject command so player angle automatically set to object angle

player.Angle = object.RotationEuler;
but its not working

Sorry For My Bad English :(
player.Angle is an int and object.RotationEuler is a Vector. Use player.Angle = object.RotationEuler.Z.

Zone_Killer

Bohemia Is God Of Punjabi Rap
Yo Yo Honey Singh tou chutiya hai

=RK=MarineForce

function onPlayerCommand( player, cmd, text );
{
 if ( cmd == "vending_machane" )
 {
  CreateObject( 334, player.World, player.Pos, 255);
 }

Pickup or models & object

Link http://wiki.vc-mp.org/wiki/Pickup_Models


  if ( cmd == "newpickup" )
  {
    CreatePickup( 366, player.World, 1, player.Pos, 255, true );
  }
}
Try to UnderStand ME!

!

Quote from: Rampages Killers on Sep 17, 2017, 09:59 PMfunction onPlayerCommand( player, cmd, text );
{
 if ( cmd == "vending_machane" )
 {
  CreateObject( 334, player.World, player.Pos, 255);
 }

Pickup or models & object

Link http://wiki.vc-mp.org/wiki/Pickup_Models


  if ( cmd == "newpickup" )
  {
    CreatePickup( 366, player.World, 1, player.Pos, 255, true );
  }
}

WT... read the topic carefully

Discord: zeus#5155