Captain Cody Posted July 11, 2014 Posted July 11, 2014 What would I use to make /spawn make a player spawn at the spawn when he uses the command
Captain Cody Posted July 11, 2014 Author Posted July 11, 2014 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 ] )
Max+ Posted July 11, 2014 Posted July 11, 2014 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 )
Captain Cody Posted July 11, 2014 Author Posted July 11, 2014 I the first script a bit but Cant figure out why its not working, Max your script isnt working addCommandHandler(spawn) function spawnPlayer ( source, 2485.3604, -544.28711, 97.96978 ) end )
TAPL Posted July 11, 2014 Posted July 11, 2014 addCommandHandler("spawn", function(player) spawnPlayer(player, 2485.3604, -544.28711, 97.96978) setCameraTarget(player) end)
Captain Cody Posted July 11, 2014 Author Posted July 11, 2014 error spawn/script atempt to call global Spawnplayer
Max+ Posted July 11, 2014 Posted July 11, 2014 lol , you are using it clientSide , it should be serverside on meta.xml and my script will work fine .
Controlled Posted July 12, 2014 Posted July 12, 2014 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now