Jump to content

* اصلأح كود setGameSpeed


Recommended Posts

Posted (edited)

سلآمم ععليكم , !

كيف حالكم ان شاء الله بخير !

انا بسوي فري روم من GUIEditor

وابي اضيف ماب زي الفري روم العادي

فيه فنكشنات ذذ ؟

Edited by Guest

Dis ; AF.#0941

Posted
سلآمم ععليكم , !

كيف حالكم ان شاء الله بخير !

انا بسوي فري روم من GUIEditor

وابي اضيف ماب زي الفري روم العادي

فيه فنكشنات ذذ ؟

خذ الآكواد من الفري روم الآصلي :wink:

"A Year from Now You May Wish You Had Started Today"

Posted

شكل الفري روم حقك انت محمله واحد معدل عليه

انا قصدي الفري روم الاصلي

Dis ; AF.#0941

Posted

Client Side --

function warpMapInit() 
    addEventHandler('onClientRender', g_Root, updatePlayerBlips) 
end 
  
function spawnMapDoubleClick(relX, relY) 
    setPlayerPosition(relX*6000 - 3000, 3000 - relY*6000, 0) 
    closeWindow(wndSpawnMap) 
end 
  
function closeSpawnMap() 
    showCursor(false) 
    removeEventHandler('onClientRender', g_Root, updatePlayerBlips) 
    for elem,data in pairs(g_PlayerData) do 
        for i,name in ipairs({'mapBlip', 'mapLabelShadow', 'mapLabel'}) do 
            if data.gui[name] then 
                destroyElement(data.gui[name]) 
                data.gui[name] = nil 
            end 
        end 
    end 
end 
  
wndSpawnMap = { 
    'wnd', 
    text = 'Select spawn position', 
    width = g_MapSide + 20, 
    controls = { 
        {'img', id='map', src='map.png', width=g_MapSide, height=g_MapSide, ondoubleclick=spawnMapDoubleClick}, 
        {'lbl', text='Welcome to freeroam. Double click a location on the map to spawn.', width=g_MapSide-60, align='center'}, 
        {'btn', id='close', closeswindow=true} 
    }, 
    oncreate = warpMapInit, 
    onclose = closeSpawnMap 
} 
  

Server Side--

  
function spawnMe(x, y, z) 
    if not x then 
        x, y, z = getElementPosition(source) 
    end 
    if isPedTerminated(source) then 
        repeat until spawnPlayer(source, x, y, z, 0, math.random(9, 288)) 
    else 
        spawnPlayer(source, x, y, z, 0, getPedSkin(source)) 
    end 
    setCameraTarget(source, source) 
    setCameraInterior(source, getElementInterior(source)) 
end 

Freeroam Code

"A Year from Now You May Wish You Had Started Today"

Posted

اصلاح الكود ذا

addEventHandler("onClientGUIClick",root, function ( ) 
 if source == GUIEditor.button[1] then 
 nameplayer = guiGridListGetItemText ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 1 ) 
 name = getPlayerFromName(nameplayer) 
 if name then  
 local text = guiGetText ( GUIEditor.edit[2] ) 
 setGameSpeed( text ) 
 outputChatBox("* قام الاعب [ "..getPlayerName(source).." ] بزيادة السرعة الى [ "..text.." ] ",255,255,0,true ) 
 else 
 outputChatBox ( "يجب ان تختأر لاعب !", 255, 255, 0, true ) 
   end 
  end 
 end 
) 

يجي بس ل الي ظغط الزر انا ابيه يجي ل الاعب الي محدد ب القريد ليست

Dis ; AF.#0941

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