Jump to content

setElementPosition


Lloyd Logan

Recommended Posts

try to fade the camera plus adding some random number like this

function consoleSetPlayerPosition ( commandName, posX, posY, posZ ) 
    setElementPosition ( getLocalPlayer(), posX + math.random( 0.8, 1.2 ), posY + math.random( 0.8, 1.2 ), posZ + math.random( 0.8, 1.2 ) ) 
end 
addCommandHandler ( "setpos", consoleSetPlayerPosition  ) 

Link to comment

Try this :

function consoleSetPlayerPosition ( commandName, posX, posY, posZ) 
localPlayer = getLocalPlayer()  
  if localPlayer then 
    fadeCamera(false, 1) 
    setTimer(fadeCamera, 1000, 1, true) 
    setTimer(setElementPosition, 1500, 1, localPlayer, posX, posY, posZ) 
  end 
end 
addCommandHandler ( "setpos", consoleSetPlayerPosition  ) 

And , Tell me the result .

Link to comment

actually the freeroam already have that's function .

this is the freeroam commands :

Player: 
 ss / setskin [id] 
 wp / give [weaponid] [ammo] 
 ac / addclothes [type] [texture] [model] 
 rc / removeclothes [type] 
 ap / alpha [value] (Transparency) 
 jp / jetpack (or press J) 
 setstyle [fightingstyle] 
 anim [lib] [name] 
  
Vehicles: 
 cv / createvehicle [vehicleid] 
 au / addupgrade [upgradeid] 
 ru / removeupgrade [upgradeid] 
 pj / paintjob [paintjobid] 
 rp / repair 
 cl / color [colorid] 
 f / flip 
  
[b][u]Tools: 
 wt / warpto [playername] 
 sp / setpos [x] [y] [z] [rot] 
 gp / getpos[/u][/b] 
  
Environment: 
 st / settime [hours] [minutes] 
 sw / setweather [weatherid] 
 speed / setgamespeed [value] 
 grav / setgravity [value] 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...