Jump to content

SycroX

Members
  • Posts

    2,141
  • Joined

  • Last visited

  • Days Won

    15

Everything posted by SycroX

  1. مصر بس الحمدلله مسافر و مش راجع لها تاني الي بعد 3 سنين
  2. ! 200 كيلوبايت بطيء جداً 200 كيلوبايت بطء جدا !! يراجل ده فمصر يعتبر احسن نت و تعتبر ملك بيه هههه
  3. عمل رائع استمر يا بطل
  4. addEventHandler("onPlayerJoin", root, function() local name = getPlayerName(source) if name == "DABL" or name == "Soking" or name == "Me[Z]oO" or name = "x1AhMeD,-09" then for i= 1, 5 do outputChatBox("[server NooB] : "..name.." Has Joined Ther Server , Die in the Hell NooB", root, 255, 255, 255, true) end end end)
  5. addEventHandler("onPlayerChat" , root, function() if isGuestAccount(getPlayerAccount(source)) then cancelEvent() outputChatBox("Please Login First", source, 255, 0, 0, true) end end) ايه شكرا معلش اصل موب addEventHandler("onPlayerChat", root, function() if isGuestAccount(getPlayerAccount(source)) then cancelEvent() outputChatBox("Please Login First", source, 255, 0, 0, true) end end)
  6. addEventHandler("onPlayerCommand", root, function( cmd ) if cmd == "register" then cancelEvent() end end) addEventHandler("onPlayerChat" , root function() if isGuestAccount(getPlayerAccount(source)) then canclEvent() outputChatBox("Please Login First", source, 255, 0, 0, true) end end)
  7. كلام DTC كان صح الحين اشتغل
  8. مشكور DTC خلاص اتحلت شكرا
  9. سلام عليكم في مشكلة عندي فلحفظ بلداتا بيس يقولي WARNING: Updates/server.lua:4: dbExec failded; (1) near "Update": syntax error الكود addEventHandler("onResourceStart", resourceRoot, function () db = dbConnect("sqlite", "database.db") dbExec(db, "CREATE TABLE IF NOT EXISTS updatetable (Time, Update, AccName)") end )
  10. كيف اسوي كيف حقيقي .. على اساس ان الكود مو حقيقي تتعور تضرب ؟ حشيش بصراحة ذذ تتعور = تتجرح تنظرب = تضرب ههه صدقت حشيش و هيروين و كلو + نفسي اضرب حد بقس واحد يموت هههه addEventHandler( "onPlayerDamage", root, function( attacker, weapon ) if ( attacker ) and ( getElementType( attacker ) == "player" ) then if weapon == 0 then killPed( source, attacker, weapon ) end end end )
  11. By : Rock مثال dxSetVisible(functionName, true) dxSetVisible(functionName, false) function dxSetVisible (fun, vis) if (fun and vis) then if (type (fun) == "function") then if (vis == true or vis == false) then if (vis == true) then addEventHandler ("onClientRender", root, fun) else removeEventHandler ("onClientRender", root, fun) end else error ("Bad Argument At #2 Got "..type (vis)) end else error ("Bad Argument At #1 Got "..type (fun)) end end end -------------------------------------------------- function isEventHandlerAdded( sEventName, pElementAttachedTo, func ) if type( sEventName ) == 'string' and isElement( pElementAttachedTo ) and type( func ) == 'function' then local aAttachedFunctions = getEventHandlers( sEventName, pElementAttachedTo ) if type( aAttachedFunctions ) == 'table' and #aAttachedFunctions > 0 then for i, v in ipairs( aAttachedFunctions ) do if v == func then return true end end end end return false end -- isEventHandlerAdded By Dawi function dxGetVisible (fun) if (fun and type (fun) == "function") then if (isEventHandlerAdded ("onClientRender", root, fun)) then return true else return false end end end
  12. ليه كلنت للسيرفر مو لازم يقدر يسويه كلو سيرفر مثال بسيط يحفظ لك السلاح الي الأيدي حقو 2 function saveAccount(source) account = getPlayerAccount(source) if account then setAccountData(account, "WeaponID2", getPedWeapon(source, 2)) setAccountData(account, "Ammo2", getPedTotalAmmo(source, 2)) else setAccountData(account, "WeaponID2", getPedWeapon(source, 2)) setAccountData(account, "Ammo2", 100) end end addEventHandler ( "onPlayerQuit", root, function() local account = getPlayerAccount(source) if account and not isGuestAccount(account) then for slot = 1, 12 do setAccountData(account, "WeaponID"..slot, getPedWeapon(source, slot)) setAccountData(account, "Ammo"..slot, getPedTotalAmmo(source, slot)) end end if not isGuestAccount(getPlayerAccount(source)) then saveAccount(source) end end) addEventHandler ( "onPlayerLogout", root, function () local account = getPlayerAccount(source) if account and not isGuestAccount(account) then for slot = 1, 12 do setAccountData(account, "WeaponID"..slot, getPedWeapon(source, slot)) setAccountData(account, "Ammo"..slot, getPedTotalAmmo(source, slot)) end end if not isGuestAccount(getPlayerAccount(source)) then saveAccount(source) end end) addEventHandler("onPlayerLogin", root, function(_, account) for slot = 1, 12 do local wep = getAccountData(account, "WeaponID"..slot) local ammo = getAccountData(account, "Ammo"..slot) if wep and ammo then giveWeapon(source, wep, ammo) end end end) addEventHandler ( "onPlayerWasted", root, function () local account = getPlayerAccount(source) if account and not isGuestAccount(account) then for slot = 1, 12 do setAccountData(account, "WeaponID"..slot, getPedWeapon(source, slot)) setAccountData(account, "Ammo"..slot, getPedTotalAmmo(source, slot)) end end end) addEventHandler("onPlayerSpawn", root, function() local account = getPlayerAccount(source) if account and not isGuestAccount(account) then for slot = 1, 12 do local wep = getAccountData(account, "WeaponID"..slot) local ammo = getAccountData(account, "Ammo"..slot) if wep and ammo then giveWeapon(source, wep, ammo) end end end end)
  13. اخر 2 للحفظ + اضيف لهم getAccountData 'onPlayerLogin' -- عشان لما يسجل يرجع له اسلحتو
  14. SycroX

    edit .

    وكيف تعرف ان اللى ضغط عليه لاعب او سياره ؟ مش انا الي عامل هيك هو الي عامل الكود ده انا صلحت لو الي onPlayerLogin + addEventHandler( "onElementClicked",root, function ( x, y, z, Player) if getElementType(source) == "player" then triggerClientEvent ( Player, "openGui", Player ) end end) + الحين انتا تبي اللوحة تفتح لمين لو تباها تفتح لللاعب الي اتضغط عليه خلي بدل Player source فلتريقر
  15. SycroX

    edit .

    addEvent("check",true) addEventHandler("check",root, function() local account = getPlayerAccount(client) if(isObjectInACLGroup("user."..getAccountName(account),aclGetGroup("Police"))) then triggerClientEvent(client,"openre",client) end end ) addEventHandler( "onElementClicked",root, function ( x, y, z ) triggerClientEvent ( source, "openGui", source ) end -- addEvent("isPolice",true) addEventHandler("isPolice",root, function () if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)),aclGetGroup("Police")) then triggerClientEvent(source,"Yes",source) end end ) addEvent("killPlayer",true) addEventHandler("killPlayer",root, function (player) local player = getPlayerFromName(player) if ( player ) then killPed(player) outputChatBox("* [ Police ] : The Player Killed Successfuly",source,0,255,0) outputChatBox("* [ Police ] : You Are Killed By " .. getPlayerName(source),player,255,0,0) end end ) addEvent("onDes",true) addEventHandler("onDes",root, function (player) local player = getPlayerFromName(player) local veh = getPedOccupiedVehicle(player) destroyElement(veh) outputChatBox("* [ Police ] : The Player Vehicle Successfuly Destoryed",source,0,255,0) outputChatBox("* [ Police ] : Your Vehicle Destroy By " .. getPlayerName(source),player,255,0,0) end ) addEvent("onBlow",true) addEventHandler("onBlow",root, function (player) local player = getPlayerFromName(player) local veh = getPedOccupiedVehicle(player) blowVehicle(veh) outputChatBox("* [ Police ] : The Player Vehicle Successfuly Blowed",source,0,255,0) outputChatBox("* [ Police ] : Your Vehicle Blow By " .. getPlayerName(source),player,255,0,0) end ) addEventHandler("onPlayerLogin",root, function () local acc = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup ( "user."..acc, aclGetGroup("Police")) then outputChatBox("* Welcome Police Man Press m To Open Police Panel",source,255,255,255,true) end end ) addEventHandler("onResourceStart",resourceRoot, function () if not aclGetGroup("Police") then outputChatBox("* Admin Please Add Group Name Police To Add Player in it To Be Police",root,255,0,0) end end )
  16. ما اعتقد تلاقي بس اطرح الي حملتو و انا هصلحو لك
  17. onElementClickedServerside event</strong></p>\n<p><strong>This event is triggered when an element is clicked on by the client. These events can only trigger when the client has its cursor enabled. It triggers for all three mousebuttons in both their up and down states.</strong></p>\n<p><strong>Parameters</strong></p>\n<p><strong>string mouseButton, string buttonState, player playerWhoClicked, float clickPosX, float clickPosY, float clickPosZ</strong></p>\n<p><strong>mouseButton: A string representing the mousebutton that was clicked. This might be left, middle or right.</strong></p>\n<p><strong>buttonState: A string representing what state the button clicked is in. This might be up or down.</strong></p>\n<p><strong>playerWhoClicked: The player that clicked on the element</strong></p>\n<p><strong>clickPosX: The X position in the world the player clicked at</strong></p>\n<p><strong>clickPosY: The Y position in the world the player clicked at</strong></p>\n<p><strong>clickPosZ: The Z position in the world the player clicked at</strong></p>\n<p><strong><span style=\"color:#FF0000;\">Source</span></strong></p>\n<p><strong><span style=\"color:#FF0000;\">The source of this event is the element that got clicked by the player</span></strong><strong>.
  18. addCommandHandler("clearsupport", function() if isObjectInACLGroup ("user."..getAccountName (getPlayerAccount(source)), aclGetGroup ( "Support" )) then for index,values in ipairs ( getElementsByType('player') ) do triggerClientEvent("clear",values ) end end end) addCommandHandler("clearsupport", function(plr) if isObjectInACLGroup ("user."..getAccountName (getPlayerAccount(plr)), aclGetGroup ( "Support" )) then triggerClientEvent(root,"clear",root) end end )
  19. للذكرى الخالدة شكلي بسوي ألبوم مخصص لتابل على هالموقع ههههههههههههههههههههههههههههه يا بوي هههه
  20. ميزو ترا الجاي اديتور تقدر تسويه منو علي كل المقاسات بطريقة سهلة جدا ما تحتاج انزل تحت هتلاقي Absolute Relative -- هو يكون مختار Absolute تلقائي المود انتا كل الي عليك تخليه Relative و يظبت لكل المقاسات -- الحق يتقال
  21. دايما مبهر بلتوفيق يا بطل لا توقف و ان شاء الله نشوفك من احسن مبرمجين العرب
×
×
  • Create New...