Jump to content

[HELP]-With-Script


#Al-Ha[J]aRii

Recommended Posts

Hey Guys

I do script spawn

how I got like this

OEhE0.jpg

Spawn

and take

this player on the Air

and this is my code ...............

addEventHandler("onResourceStart", resourceRoot, start) 
  
 Grove = createTeam("Grove") 
 function start() 
     setPlayerTeam( setPlayerTeam ( source, Grove ), Grove) 
  
 end 
  
x,y,z = 0,0,0  
  
skin = 2 
  
function spawn(player) 
    spawnPlayer(player,x,y,z,0,skin) 
  
    fadeCamera(player,true) 
  
    setCameraTarget(player,player) 
  
end 
  
  
  
addEventHandler("onResourceStart",resourceRoot, 
  
    function () 
  
        for i,player in ipairs(getElementsByType("player")) do 
  
            spawn(player) 
  
        end 
  
    end 
  
) 
  
  
  
  
addEventHandler("onPlayerJoin",root, 
  
    function () 
  
        spawn(source) 
  
    end 
  
) 
  
  
  
addEventHandler("onPlayerWasted",root, 
  
    function () 
  
        setTimer(spawn,3000,1,source) 
  
    end 
  
) 
function Alee() 
    for i, TEAMS in ipairs ( getElementsByType("Grove") ) do 
            if ( getTeamFriendlyFire ( TEAMS ) == true ) then 
                setTeamFriendlyFire ( TEAMS, false ) 
            end 
        end 
end 
    addEventHandler("onResourceStart", resourceRoot, Alee) 

Link to comment

@Alhajarii, this will be a client side script for sure. Else everyone will see flying players! :lol:

To start off, we will need the following functions (correct me if I'm wrong, I haven't written it so I'm just thinking right now):

  
createPed (use the client function for it!) 
guiCreateButton  
setElementModel 
getElementModel 
spawnPlayer (server side) 
  

Okee, I'm not writing the script for you, but I'll make an overview to see how the script is going to work;

- player logs in 
- player will get the buttons and the standart skin (0) 
- player will choose the skin with the buttons 
- player presses the button 
- player will get spawned with the selected skin (ElementModel) 
  

Goodluck! tell me if you're stuck. :)

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