Jump to content

طلب عمل اكثر من 3 بدايات


CRoW,,#

Recommended Posts

السلام عليكم ورحمة الله وبركاتةة

سويت لك هـ المثال كـ شكل بسيط مبسط لـ احداثيات عشوائية عند تشغيل السكربت #

وبيسوي شخصية ..الخ # نظام سبآون عشوائي #

من قيم مود الـ "Play" :P .

  
Position = { 
[1] = {x,y,z},  
[2] = {x,y,z},  
[3] = {x,y,z},  
} 
  
addEventHandler("onResourceStart", resourceRoot, 
    function() 
        for i,player in ipairs(getElementsByType("player")) do 
            spawn(player) 
        end 
    end 
) 
  
  
function spawn(player) 
    if not isElement(player) then return end 
    local x,y,z = unpack(Position[math.random(#Position)])   
    repeat until spawnPlayer ( player, x,y,z)    
    fadeCamera(player, true) 
    setCameraTarget(player, player) 
end 
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...