PaiN^
Members-
Posts
2,258 -
Joined
-
Last visited
Everything posted by PaiN^
-
I have sent you the code, Check your PMs ..
-
I know where it should be created, but it isn't creating it DX Can i send you full code on PM ?
-
I tried this : addEventHandler ( 'onClientGUIClick', root, function ( ) if source == GUIEditor.button[1] then fileName = guiGetText ( GUIEditor.edit[1] ) if string.len(fileName) > 1 then if fileExists ( fileName..'.lua' ) then outputChatBox ( '*Error : A file with that name allready exists !', 255, 0, 0 ) guiSetText ( GUIEditor.edit[1], '' ) else the_file = fileCreate ( fileName..'.lua' ) if ( the_file ) then guiSetText ( GUIEditor.edit[1], '' ) guiSetVisible ( GUIEditor.window[1], false ) guiSetVisible ( GUIEditor.window[2], true ) end fileClose ( the_file ) end end end end ) And this : addEventHandler ( 'onClientGUIClick', root, function ( ) if source == GUIEditor.button[1] then fileName = guiGetText ( GUIEditor.edit[1] ) if string.len(fileName) > 1 then if fileExists ( fileName..'.lua' ) then outputChatBox ( '*Error : A file with that name allready exists !', 255, 0, 0 ) guiSetText ( GUIEditor.edit[1], '' ) else the_file = fileCreate ( fileName..'.lua' ) if ( the_file ) then guiSetText ( GUIEditor.edit[1], '' ) guiSetVisible ( GUIEditor.window[1], false ) guiSetVisible ( GUIEditor.window[2], true ) fileClose ( the_file ) end end end end end ) Bad 'file' pointer @ fileClose (1) And i tried it with fileFlush, Same error ..
-
إذا تبي أنا فاضي, أقدر أساعدك
-
تسلم على الشرح الكافي × الوافي بس عندك غلط صغيير باين انه مع الكتابة executeSQLQuery("SELECT * FROM players WHERE name=?", playerName )
-
Hi, I have this code : [client] addEventHandler ( 'onClientGUIClick', root, function ( ) if source == GUIEditor.button[1] then local fileName = guiGetText ( GUIEditor.edit[1] ) if string.len(fileName) > 1 then if fileExists ( fileName..'.lua' ) then outputChatBox ( '*Error : A file with that name allready exists !', 255, 0, 0 ) guiSetText ( GUIEditor.edit[1], '' ) else the_file = fileCreate ( fileName..'.lua' ) if ( the_file ) then outputChatBox ( 'file '..fileName..' was created !' ) guiSetText ( GUIEditor.edit[1], '' ) guiSetVisible ( GUIEditor.window[1], false ) end end end end end ) And i have the resource as a folder not .zip, When i press the button it says that the file was created, When i try to make another file with the same name it says that it exists . But when i go to the resource folder i find nothing there, Can any one tell me why .? Thank you in advanced .
-
تاكد ان المودات mapmanager mapcycler spawnmanger race عندها صلاحية آدمن + شغالة
-
function jailPlayer( player, cmd, target, ttime ) if isPlayerAdmin ( player ) then jailedPlayer = getPlayerFromName ( target ) if jailedPlayer then if getElementData ( jailedPlayer, "jailed" ) == false then if isPedInVehicle ( jailedPlayer ) then removePedFromVehicle ( jailedPlayer ) end local jx, jy, jz = unpack(jailcells[math.random(#jailcells)]) setElementDimension ( jailedPlayer, 60601 ) setElementInterior ( jailedPlayer, 12 ) setElementPosition ( jailedPlayer, jx, jy, jz ) setElementData ( jailedPlayer, "jailed", true ) setTimer ( function ( ) setElementData ( jailedPlayer, "jailed", false ) setElementDimension ( jailedPlayer, 0 ) setElementInterior ( jailedPlayer, 0 ) setElementPosition ( jailedPlayer, 2492.408, 2773.22, 10.80 ) end, ( ttime * 1000 ) * 60, 1 ) else outputChatBox ( "This Player is already jailed!", player, 255, 0, 0 ) end else outputChatBox ( "Player does not exist!", player, 255, 0, 0 ) end end end addCommandHandler ( "jail", jailPlayer ) This should do it, Give it a try ..
-
[TUT] Updating admin countries (Manual & Automatic)
PaiN^ replied to codeluaeveryday's topic in Tutorials
Nice Tut, put i don't why any one will use the manual way instead of the automatic .. -
I'm with this suggestion +1
-
You should use banPlayer instead ..
-
There's no need to use client side ! [server] timeToJail = 1 -- In minutes ! function jailPlayer( player, cmd, target, ttime ) if isPlayerAdmin ( player ) then jailedPlayer = getPlayerFromName ( target ) if jailedPlayer then if getElementData ( jailedPlayer, "jailed" ) == false then if isPedInVehicle ( jailedPlayer ) then removePedFromVehicle ( jailedPlayer ) end local jx, jy, jz = unpack(jailcells[math.random(#jailcells)]) setElementDimension ( jailedPlayer, 60601 ) setElementInterior ( jailedPlayer, 12 ) setElementPosition ( jailedPlayer, jx, jy, jz ) setElementData ( jailedPlayer, "jailed", true ) setTimer ( function ( ) setElementData ( jailedPlayer, "jailed", false ) setElementDimension ( jailedPlayer, 0 ) setElementInterior ( jailedPlayer, 0 ) setElementPosition ( jailedPlayer, 2492.408, 2773.22, 10.80 ) end, ( timeToJail * 1000 ) * 60, 1 ) else outputChatBox ( "This Player is already jailed!", player, 255, 0, 0 ) end else outputChatBox ( "Player does not exist!", player, 255, 0, 0 ) end end end addCommandHandler ( "jail", jailPlayer ) Just change the ' timeToJail ' to the time you want ..
-
That obviously won't work, It's for GUIs only ! You can try to delete the text and rewrite it ..
-
لوول شغال المشكلة كانت في مود بلاي ذذ + مشكوووور برستيج
-
يزن هذا يحدد موقع اللوحة أنا كنت أبغى مكان الزر وحجمه وكذا بس خلاص حصلتها + مشكوور + آخر سؤال أنا أبغى لمن الواحد تحميله ما خلص, تطلعله صورة من السيرفر setCameraMatrix يعني بإستخدامـ جربت كذا بس ما نفع addEventHandler ( 'onClientPlayerJoin', root, function ( ) if isTransferBoxActive ( ) == true then setCameraMatrix ( -2521.88671875, 339.87979125977, 35.094898223877, -2520.9926757813, 340.20202636719, 35.406051635742, 70, 0 ) else setCameraTarget ( source ) end end )
-
اوك مشكوور عندي سؤال ثاني wndMain = { 'wnd', text = 'FR GUI', x = 10, y = 150, width = 280, controls = { {'lbl', text='Local player'}, {'br'}, {'btn', id='kill', onclick=killLocalPlayer}, {'btn', id='skin', window=wndSkin}, {'btn', id='anim', window=wndAnim}, {'btn', id='weapon', window=wndWeapon}, {'btn', id='clothes', window=wndClothes}, {'btn', id='playergrav', text='grav', window=wndGravity}, {'btn', id='warp', window=wndWarp}, {'btn', id='stats', window=wndStats}, {'btn', id='bookmarks', window=wndBookmarks}, {'br'}, {'chk', id='jetpack', onclick=toggleJetPack}, {'chk', id='falloff', text='fall off bike', onclick=toggleFallOffBike}, {'br'}, {'lbl', text='Pos:'}, {'lbl', id='xpos', text='x', width=45}, {'lbl', id='ypos', text='y', width=45}, {'lbl', id='zpos', text='z', width=45}, {'btn', id='setpos', text='map', window=wndSetPos}, {'btn', id='setinterior', text='int', window=wndSetInterior}, {'br'}, {'br'}, {'lbl', text='Vehicles'}, {'br'}, {'lbl', text='Current:'}, {'lbl', id='curvehicle'}, {'br'}, {'btn', id='createvehicle', window=wndCreateVehicle, text='create'}, {'btn', id='repair', onclick=repairVehicle}, {'btn', id='flip', onclick=flipVehicle}, {'btn', id='upgrades', window=wndUpgrades}, {'btn', id='color', onclick=openColorPicker}, {'btn', id='paintjob', window=wndPaintjob}, {'br'}, {'chk', id='lightson', text='Lights on', onclick=forceLightsOn}, {'chk', id='lightsoff', text='Lights off', onclick=forceLightsOff}, {'br'}, {'br'}, {'lbl', text='Environment'}, {'br'}, {'btn', id='time', window=wndTime}, {'chk', id='freezetime', text='freeze', onclick=toggleFreezeTime}, {'btn', id='weather', window=wndWeather}, {'btn', id='speed', window=wndGameSpeed} }, oncreate = mainWndShow, onclose = mainWndClose } انا متأكد ان هذا هو تصميم النافذة, انا ابغى اعرف كيف اعدل عليه؟ وين احط الاحداثيات؟ كيف طريقته يعني
-
! طيب ممكن أحد يعطيني الكود, محتاجه ضروري
-
السلامـ عليكمـ أخواني بغيت الكود اللي في الفري روم حق الخريطة, يعني لمن اضغط على اي مكان بالخريطة يوديني له ماعرفت اخرجه من الفري روم, وشكراً
-
There is a made function called centerWindow, It was made to center windows but you can use it to any GUI element ( Including labels ! ) Use your math skills to do a function like it to get the text in the wanted place at any resolution ..
-
You mean to create the dx and GUI things ? GUIEditor
