Jump to content

Spawn command


Recommended Posts

I made a script but how do I make the spawn player act as a function

bool addCommandHandler ( string spawn, function spawn, [bool restricted = false, bool caseSensitive = false] ) 
  
bool spawnPlayer ( player thePlayer, float x, float y, float z, [ int rotation = 0, int interior = 0, int dimension = 0, team theTeam = nil ] ) 

Link to comment

addCommandHandler('spawn', 
function ( ) 
 spawnPlayer ( source, nX, nY, nZ ) --- nX, nY, nZ Change it to your x, y, z position 
 fadeCamera( source, true ) 
 setCameraTarget ( source, source ) 
 giveWeapon ( source, 31, 200 ) 
 setPedArmor ( source, 100 ) 
 outputChatBox( ' Spawned With M4 And  Armor ' , source, 255, 255, 0 ) 
end 
) 
Link to comment
How can I make it so it keeps skin
  
     addCommandHandler("spawn", 
    function(player)   
          local skinID = getElementModel(player) 
          spawnPlayer(player, 2485.3604, -544.28711, 97.96978, 0, skinID) 
          setCameraTarget(player) 
    end) 
  

You should just look stuff up on the wiki for things like this. Its clearly on the spawnPlayer page.

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...