Jump to content

setPedStat


Sektor

Recommended Posts

  
function PlayerClotnesOff(source) 
    removePedClothes (source, 16 )     -- remove the helmet 
    removePedClothes (source, 15 )     -- remove the helmet 
    removePedClothes (source, 14 )     -- remove the helmet 
    removePedClothes (source, 13 )     -- remove the helmet 
    removePedClothes (source, 12 )     -- remove the helmet 
    removePedClothes (source, 11 )     -- remove the helmet 
    removePedClothes (source, 10 )     -- remove the helmet 
    removePedClothes (source, 9 )     -- remove the helmet 
    removePedClothes (source, 8 )     -- remove the helmet 
    removePedClothes (source, 7 )     -- remove the helmet 
    removePedClothes (source, 6 )     -- remove the helmet 
    removePedClothes (source, 5 )     -- remove the helmet 
    removePedClothes (source, 4 )     -- remove the helmet 
    removePedClothes (source, 3 )     -- remove the helmet 
    removePedClothes (source, 2 )     -- remove the helmet 
    removePedClothes (source, 1 )     -- remove the helmet 
    removePedClothes (source, 0 )     -- remove the helmet 
end 
  
addEventHandler("onResourceStart", resourceRoot, function() 
            resetMapInfo() 
             
        end 
) 
  
function spawn(player) 
    setPedStat(player, 24, 250) 
    setPedStat(player, 21, 0.0) 
    setPedStat(player, 22, 0.0) 
    setPedStat(player, 23, 0.0) 
    setPedStat(player, 27, 0.0) 
    setPedStat(player, 165, 10) 
    setPedChoking(player, false) 
     
    spawnPlayer(player, 0.0, 0.0, 0.0, 90.0, 0) 
    fadeCamera(player, true) 
    setCameraTarget(player, player) 
    showChat(player, true) 
    setElementPosition(player, 2316.1623, 49.6955, 26.482)  --put v bomjatnik 
    --setElementModel(player, 0) 
    setElementFrozen(player, false) 
    addPedClothes (player, "moto", "moto", 16 ) 
    PlayerClotnesOff(player) 
    createBlipAttachedTo ( player, 52 ) 
    local blip = createBlip (100.0, -500.0, 17.0, 0, 4, 255, 125, 0, 255, 0, 1000.0) 
end 
  
  
addEventHandler("onPlayerJoin", root, 
    function() 
        spawn(source) 
    end 
) 
  
addEventHandler("onPlayerWasted", root, 
    function() 
        setTimer(spawn, 1800, 1, source) 
    end 
) 
  
  

the code.

Link to comment

Instead of

function spawn(player) 
    setPedStat(player, 24, 250) 
    setPedStat(player, 21, 0.0) 
    setPedStat(player, 22, 0.0) 
    setPedStat(player, 23, 0.0) 
    setPedStat(player, 27, 0.0) 
    setPedStat(player, 165, 10) 
    setPedChoking(player, false) 
    
    spawnPlayer(player, 0.0, 0.0, 0.0, 90.0, 0) 
    fadeCamera(player, true) 
    setCameraTarget(player, player) 
    showChat(player, true) 
    setElementPosition(player, 2316.1623, 49.6955, 26.482)  --put v bomjatnik 
    --setElementModel(player, 0) 
    setElementFrozen(player, false) 
    addPedClothes (player, "moto", "moto", 16 ) 
    PlayerClotnesOff(player) 
    createBlipAttachedTo ( player, 52 ) 
    local blip = createBlip (100.0, -500.0, 17.0, 0, 4, 255, 125, 0, 255, 0, 1000.0) 
end 
  
  
addEventHandler("onPlayerJoin", root, 
    function() 
        spawn(source) 
    end 
) 
  

why not try

function spawn() 
    setPedStat(source, 24, 250) 
    setPedStat(source, 21, 0.0) 
    setPedStat(source, 22, 0.0) 
    setPedStat(source, 23, 0.0) 
    setPedStat(source, 27, 0.0) 
    setPedStat(source, 165, 10) 
    setPedChoking(source, false) 
    
    spawnPlayer(source, 0.0, 0.0, 0.0, 90.0, 0) 
    fadeCamera(source, true) 
    setCameraTarget(source, source) 
    showChat(source, true) 
    setElementPosition(source, 2316.1623, 49.6955, 26.482)  --put v bomjatnik 
    --setElementModel(source, 0) 
    setElementFrozen(source, false) 
    addPedClothes (source, "moto", "moto", 16 ) 
    PlayerClotnesOff(source) 
    createBlipAttachedTo ( source, 52 ) 
    local blip = createBlip (100.0, -500.0, 17.0, 0, 4, 255, 125, 0, 255, 0, 1000.0) 
end 
  
  
addEventHandler("onPlayerJoin", root,spawn) 
  

If it still doesn't work, try something else. =B

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