-
Posts
2,156 -
Joined
-
Last visited
-
Days Won
6
Everything posted by ' A F .
-
onClientPlayerDamage getElementData cancelEvent
-
outputChatBox("#ff0000* ليس لديك مال كافي",source,255,0,0,true)
-
^ guiGridListGetSelectedItemText to guiGridListGetItemText
-
ههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههه
-
@Marshmello لول ذا انا سويته له هو كان فاهم غلط
-
خلهم يتورطون كل الي في السياره ابشر getVehicleOccupants
-
function dxCreateButton ( x , y , w , h , text , postGui ) postGui = postGui or false dxDrawRectangle ( x , y , w , h , tocolor ( 255 , 255 , 255 , 100 ) , postGui ) dxDrawText ( text , x , y , x+w , y+h , tocolor ( 255,255,255,255 ) , 1 , "default-bold" , "center" , "center" , false , false , postGui , true , true ) end addEventHandler("onClientRender", root, function() dxCreateButton(300, 258, 193, 27,"Hello World",true) end )
-
getVehicleController عشان تجيب السائق . ^
-
onClientRender dxDrawRectangle dxDrawText
-
..تصرف شرير لا ومسوي موضوع يبي يرتب قسم البرمجة انت اول شيء رتب نفسك
-
@SaedAmer getPlayerIdleTime = server side dxDrawImageOnElement = client side استخدم الداتا واستقبل الداتا بجانب الكلنت
-
+ setTimer X getPlayerIdleTime
-
[ Centos 5/6 | سيرفرات كاملة | SolusVm | شرح | تثبيت لوحة ]
' A F . replied to MAXM's topic in الاستضافات
شرح رائع , أستمر -
مود رائع صراحة , بس ماله داعي تحط حقوقي ..
-
العفو حياك الله ..
-
[ int rotation = 0, int skinID = 0, int interior = 0, int dimension = 0, team theTeam = getPlayerTeam(thePlayer) ] ارقمنتات ليست اجبارية
-
Client Side : GUIEditor = { label = { } , window = { } , gridlist = { } , edit = { } , button = { } , Key = "f4" }; addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(188, 165, 311, 361, "Send Money", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFFE9E9") guiSetVisible ( GUIEditor.window [ 1 ] , false ) GUIEditor.gridlist[1] = guiCreateGridList(13, 30, 126, 317, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Player", 0.9) GUIEditor.button[1] = guiCreateButton(149, 88, 142, 34, "Send", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(139, 53, 162, 35, "==================", false, GUIEditor.window[1]) GUIEditor.label[2] = guiCreateLabel(139, 136, 162, 35, "==================", false, GUIEditor.window[1]) GUIEditor.edit[1] = guiCreateEdit(145, 168, 156, 36, "", false, GUIEditor.window[1]) GUIEditor.label[3] = guiCreateLabel(139, 222, 162, 35, "==================", false, GUIEditor.window[1]) GUIEditor.label[4] = guiCreateLabel(139, 273, 162, 35, "==================", false, GUIEditor.window[1]) GUIEditor.label[5] = guiCreateLabel(139, 322, 162, 35, "==================", false, GUIEditor.window[1]) guiSetInputEnabled ( false ) end ) function RefreshGridlist ( aElement , Col ) if ( getElementType ( aElement ) == "gui-gridlist" ) then guiGridListClear ( aElement ) Col = Col or 1 for i,v in ipairs ( getElementsByType("player") ) do local aRow = guiGridListAddRow ( aElement ) guiGridListSetItemText ( aElement , aRow , Col , getPlayerName ( v ) , false , false ) end end end bindKey(GUIEditor["Key"],"down", function ( ) guiSetVisible ( GUIEditor.window [ 1 ] , not guiGetVisible ( GUIEditor.window [ 1 ] ) ) showCursor ( guiGetVisible ( GUIEditor.window [ 1 ] ) ) guiSetInputEnabled ( guiGetVisible ( GUIEditor.window [ 1 ] ) ) RefreshGridlist ( GUIEditor.gridlist [ 1 ] ) end ); function Update ( ) RefreshGridlist ( GUIEditor.gridlist [ 1 ] ) end addEventHandler ("onClientPlayerJoin",root,Update) addEventHandler ("onClientPlayerChangeNick",root,Update) addEventHandler ("onClientPlayerQuit",root,Update) --------------------- addEventHandler("onClientGUIClick",resourceRoot, function ( ) if ( source == GUIEditor.button[1] ) then local InfoSelected = { guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) }; if ( InfoSelected [ 1 ] ~= -1 and guiGetText ( GUIEditor.edit[1] ) ~= "" ) then triggerServerEvent("SendMoney",getLocalPlayer(),guiGridListGetItemText(GUIEditor.gridlist[1],InfoSelected[1],InfoSelected[2]),guiGetText(GUIEditor.edit[1])) else outputChatBox("Please Select a Player or Write Money",255,0,0,true) end end end ) Server Side : addEvent("SendMoney",true) addEventHandler("SendMoney",root, function ( aPlayer , aPrice ) if ( getPlayerFromName ( aPlayer ) and tonumber ( aPrice ) ) then if ( getPlayerFromName ( aPlayer ) == source ) then return outputChatBox("* You Can't Send For YourSelf !",source,255,0,0,true) end if ( getPlayerMoney ( source ) >= tonumber ( aPrice ) ) then givePlayerMoney ( getPlayerFromName ( aPlayer ) , tonumber ( aPrice ) ) takePlayerMoney ( source , tonumber ( aPrice ) ) else outputChatBox("* You Don't Have "..aPrice.."",source,255,0,0,true) end end end )
-
exports.scoreboard:addScoreboardColumn('Time') local t = { } function checkValues( source,arg1,arg2) if (arg2 >= 60) then t[ source ][ 'min' ] = tonumber( t[ source ][ 'min' ] or 0 ) + 1 t[ source ][ 'sec' ] = 0 end if (arg1 >= 60) then t[ source ][ 'min' ] = 0 t[ source ][ 'hour' ] = tonumber( t[ source ][ 'hour' ] or 0 ) + 1 end return arg1, arg2 end setTimer( function( ) for _, v in pairs( getElementsByType( "player" ) ) do if (not t[ v ]) then t[ v ] = { ["hour"] = 0, ["min"] = 0, ["sec"] = 0 } end t[ v ][ 'sec' ] = tonumber( t[ v ][ 'sec' ] or 0 ) + 1 local min,sec = checkValues ( v, t[ v ][ 'min' ] or 0, t[ v ][ 'sec' ] or 0 ) local hour = tonumber( t[ v ][ 'hour' ] or 0 ) setElementData( v, "Time", tostring( hour )..':'..tostring( min )..':'..tostring( sec ) ) end end, 1000, 0 ) function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then local sValue = getElementData( source,'Time' ) setAccountData ( playeraccount, "Online Time", tostring(sValue) ) end t[ source ] = nil end function onPlayerLogin (_, playeraccount ) if ( playeraccount ) then local time = getAccountData ( playeraccount, "Online Time" ) if ( time ) then setElementData ( source, "Time", time ) else setElementData ( source, "Time",0 ) setAccountData ( playeraccount, "Time",0 ) end end end addEventHandler ( "onPlayerQuit", root, onPlayerQuit ) addEventHandler ( "onPlayerLogin", root, onPlayerLogin )
-
طيب هو قتله شيء ؟ بس قاله ان كودك خطاً .
-
@Mr,[L]e3bA اذا انت بتحفظه ع الحساب ليه تستخدم executeSQLQuery احفظه ع الاكاونت داتا
-
Client Side : function dxDrawFramedText ( message, left, top, width, height, color, scale, font, alignX, alignY, clip, wordBreak, postGUI, frameColor, colorCoded ) color = color or tocolor ( 0, 0, 0, 50 ) frameColor = frameColor or tocolor ( 0, 0, 0, 255 ) scale = scale or 1.1 font = font or "default" alignX = alignX or "left" alignY = alignY or "top" clip = clip or false wordBreak = wordBreak or false postGUI = postGUI or false colorCoded = colorCoded or false dxDrawText ( message, left + 1, top + 1, width + 1, height + 1, frameColor, scale, font, alignX, alignY, clip, wordBreak, postGUI, colorCoded ) dxDrawText ( message, left + 1, top - 1, width + 1, height - 1, frameColor, scale, font, alignX, alignY, clip, wordBreak, postGUI, colorCoded ) dxDrawText ( message, left - 1, top + 1, width - 1, height + 1, frameColor, scale, font, alignX, alignY, clip, wordBreak, postGUI, colorCoded ) dxDrawText ( message, left - 1, top - 1, width - 1, height - 1, frameColor, scale, font, alignX, alignY, clip, wordBreak, postGUI, colorCoded ) dxDrawText ( message, left, top, width, height, color, scale, font, alignX, alignY, clip, wordBreak, postGUI, colorCoded ) end addEventHandler ( "onClientRender", root, function ( ) local data = getElementData ( resourceRoot, "3ajel" ) if ( data ) then dxDrawFramedText ( "* ".. tostring(data[1]), 14, 571, 766, 605, tocolor ( 255, 255, 255, 255 ), 1.00, "default-bold", "left", "top", false, false, false, false, true ) end end ) bindKey ( "u", "down", "chatbox", "AM" ) Server Side : local AMGROUPS = { "Head.Admin", "Console" } function isCAN ( plr ) local accName = getAccountName ( getPlayerAccount ( plr ) ) for _,v in ipairs( AMGROUPS ) do if ( isObjectInACLGroup ( "user." .. accName, aclGetGroup ( v ) ) ) then return true end end end function check ( thePlayer, commandName, ... ) if ( isCAN ( thePlayer ) ) then local Msg = { ... } local message = table.concat ( Msg, " " ) setElementData ( resourceRoot, "3ajel", { message }) end end addCommandHandler ( "AM", check ) function clear ( thePlayer, commandName ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "Console" ) ) then setElementData ( resourceRoot, "3ajel", false ) end end addCommandHandler("Clear", clear)