Jump to content

- [ طلب ] - | l فانكشنات


Recommended Posts

اها فهمتك يعني لو ابي اجيب الاعب في القريد ليست مع سااعاته راح احطه سيرفر راح احط كودك الي فوق اول المود فوق

ثمن اسوي كذا

	

function accounts(_, arg2) 
    if eventName == "onResourceStart" then 
        for k, v in ipairs(getElementsByType("player")) do 
            local account = getPlayerAccount(v) 
            if account and not isGuestAccount(account) then 
                setAccountData(account, "nick", getPlayerName(v)) 
            end 
        end 
    elseif eventName == "onPlayerLogin" then 
        setAccountData(arg2, "nick", getPlayerName(source)) 
    elseif eventName == "onPlayerChangeNick" then 
        local account = getPlayerAccount(source) 
        if account and not isGuestAccount(account) then 
            setAccountData(account, "nick", arg2) 
        end 
    end 
end 
addEventHandler("onResourceStart", resourceRoot, accounts) 
addEventHandler("onPlayerLogin", root, accounts) 
addEventHandler("onPlayerChangeNick", root, accounts) 


addEvent( "Time2", true )
addEventHandler( "Time2", root, function(  )
local acc = getPlayerAccount (source)
	if not isGuestAccount (source) then
local accountName = getAccountName (acc)
      local player1 = getAccountData (accountName, "nick", getPlayerName(v))
 local Time1 = executeSQLQuery("SELECT * FROM Prestege2_Save_Time ORDER BY PlayerAccount LIMIT 50", accountName )
    if  (  Time1 ) then
           
        
	        triggerClientEvent(root,'Time3',root,Time1,player1)
			end
		end
	end
)

 

 


Link to comment
addCommandHandler ( "save-pos",
    function ( plr )  
        local x,y,z = getElementPosition ( plr )
        if ( x and y and z ) then
            setElementData(plr, "position", {x,y,z, getElementModel(plr)})
            outputChatBox("تم حفظ إحداثياتك بنجاح", plr, 0, 255, 0, true)
        end
    end
)

addEventHandler("onPlayerWasted", root,
    function ()
        local x,y,z, m = unpack(getElementData(source, "position"))
        if ( x and y and z and m ) then
            setTimer( spawnPlayer, 2000, 1, source, x,y,z, 0, m)
            outputChatBox("تم نقلك لإحداثياتك", source, 0, 255, 0, true)
        end
    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...