Jump to content

Spawn command


Recommended Posts

Posted

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 ] ) 

Wolf Inc Discord

Youtube channel
Github

Posted

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 
) 

- New , Kill System

- New, GameMode Intro

- Leve / Exp System

- New nametag showing style

- New , Hud For Players

- Skin Selection from SA-MP

- Money System / Buy Weapons

- Drop Weapons

- New, Flood System

- New , Group Assign

- Gun license For Weapons

- Random Rule System For Money

Posted

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 
    ) 

Wolf Inc Discord

Youtube channel
Github

Posted
addCommandHandler("spawn", 
function(player)   
      spawnPlayer(player, 2485.3604, -544.28711, 97.96978) 
      setCameraTarget(player) 
end) 

CiTLh.png
Posted

lol , you are using it clientSide , it should be serverside on meta.xml and my script will work fine .

- New , Kill System

- New, GameMode Intro

- Leve / Exp System

- New nametag showing style

- New , Hud For Players

- Skin Selection from SA-MP

- Money System / Buy Weapons

- Drop Weapons

- New, Flood System

- New , Group Assign

- Gun license For Weapons

- Random Rule System For Money

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

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