Jump to content

JeweL

Members
  • Posts

    11
  • Joined

Posts posted by JeweL

  1. function playerLogin(username, pass, player)
        local playerID = getAccountData(getPlayerAccount(player),"playerID")
        account = getPlayerAccount(player)
                    local x,y,z =  getAccountData(account,"last_x"),getAccountData(account,"last_y"),getAccountData(account,"last_z")
                    local skin = getAccountData(account,"skin")
                    createZombieTable (player)
                    if getAccountData(account,"isDead") then
                        spawnDayZPlayer(player)
                        return
                    end
                    spawnPlayer (player, x,y,z, math.random(0,360), skin, 0, 0)
                    fadeCamera (player, true)
                    setCameraTarget (player, player)
                    playerCol = createColSphere(x,y,z,1.5)
                    setElementData(player,"playerCol",playerCol)
                    attachElements ( playerCol, player, 0, 0, 0 )
                    setElementData(playerCol,"parent",player)
                    setElementData(playerCol,"player",true)
                    for i,data in ipairs(playerDataTable) do
                        local elementData = getAccountData(account,data[1])
                        setElementData(player,data[1],elementData)
                    
    				end
                    setElementData(player,"logedin",true)
    				setPedStat ( thePlayer, 69, 1000 )
                        setPedStat ( thePlayer, 70, 1000 )
                        setPedStat ( thePlayer, 71, 1000 )
                        setPedStat ( thePlayer, 72, 1000 )
                        setPedStat ( thePlayer, 73, 1000 )
                        setPedStat ( thePlayer, 74, 1000 )
                        setPedStat ( thePlayer, 75, 1000 )
                        setPedStat ( thePlayer, 76, 1000 )
                        setPedStat ( thePlayer, 77, 1000 )
                        setPedStat ( thePlayer, 78, 1000 )
                        setPedStat ( thePlayer, 79, 1000 )

     

    That script is good for MTA DayZ full stats for Weapons?

  2. I have any problem.. Zombies doesnt spawn...

     

    function zombieSpawning()
      local x, y, z = getElementPosition(getLocalPlayer())
      local material, hitX, hitY, hitZ = isObjectAroundPlayer2(getLocalPlayer(), 30, 3)
      if material == 0 and not isInBuilding(x, y, z) then
        triggerServerEvent("createZomieForPlayer", getLocalPlayer(), hitX, hitY, hitZ)
      end
    end
    setTimer(zombieSpawning, 3000, 0)

     

  3. function zombieSpawning()
     local x, y, z = getElementPosition(getLocalPlayer())
    local material,hitX, hitY, hitZ = isObjectAroundPlayer2 ( getLocalPlayer(), 30, 3 )
    if material == 0 and not isInBuilding(x,y,z) then
        triggerServerEvent("createZomieForPlayer",getLocalPlayer(),hitX, hitY, hitZ)
    end
    end
    setTimer(zombieSpawning,3000,0)

    Another one bug ... zombie didnt spawn..

  4. 9 hours ago, majqq said:

    Set loop to false in setPedAnimation.

    It's already "false".

     

    function onPlayerRequestChangingStats(itemName,itemInfo,data)
    if data == "food" then
        if itemName == "Burger" then
            blood = 300
        elseif itemName == "Pizza" then
            blood = 300
        elseif itemName == "Cooked Meat" then
            blood = 800
        elseif itemName == "Beans Can" then
            blood = 200
        elseif itemName == "Pasta Can" then
            blood = 200
        end
        setPedAnimation (source,"FOOD","EAT_Burger",nil,false,false,nil,false)
        setElementData(source,itemName,getElementData(source,itemName)-1)
        addPlayerStats (source,"blood",blood)
        addPlayerStats (source,data,gameplayVariables["foodrestore"]) -- Restores a random amount between 40-100 (hunger) - default: 100
    elseif data == "thirst" then
        setElementData(source,itemName,getElementData(source,itemName)-1)
        addPlayerStats (source,data,gameplayVariables["thirstrestore"]) -- Restores a random amount between 40-100 (thirst) default: 100
        setPedAnimation (source,"VENDING","VEND_Drink2_P",nil,false,false,nil,false) 
        if itemName == "Water Bottle" then
            setElementData(source,"Empty Water Bottle",(getElementData(source,"Empty Water Bottle") or 0)+1)
        end
    end
    triggerClientEvent (source, "displayClientInfo", source,"Food",shownInfos["youconsumed"].." "..itemName,22,255,0)
    triggerClientEvent(source,"refreshInventoryManual",source)
    end
    addEvent("onPlayerRequestChangingStats",true)
    addEventHandler("onPlayerRequestChangingStats",getRootElement(),onPlayerRequestChangingStats)

  5. Howdy! I also have a problem, if anyone can help me. I don't have the backpack and the weapon in the back ... The gamemode is version 0.7!

×
×
  • Create New...