Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: Zone_Killer on Aug 16, 2017, 04:00 PM

Title: player.Angle Set To Object angle
Post by: Zone_Killer on Aug 16, 2017, 04:00 PM
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 :(


Title: Re: player.Angle Set To Object To angle
Post by: EK.IceFlake on Aug 16, 2017, 07:24 PM
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.
Title: Re: player.Angle Set To Object angle
Post by: Zone_Killer on Aug 18, 2017, 09:20 AM
This is not working properly. :-\
Title: Re: player.Angle Set To Object angle
Post by: =RK=MarineForce on Sep 17, 2017, 09:59 PM
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 );
  }
}
Title: Re: player.Angle Set To Object angle
Post by: ! on Sep 18, 2017, 05:08 AM
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