Jump to content

The Killer

Members
  • Posts

    1,336
  • Joined

Everything posted by The Killer

  1. Event # 'onPlayerLogin' 'onPlayerQuit' function # getElementData setAccountData getAccountData
  2. local teamName = getTeamName (getPlayerTeam (player)) if getPlayerTeam (player) and teamName == "Police" or teamName == "FBI" or teamName == "SWAT" then -- Your stuff
  3. local ped = createPed ( ... ) setElementFrozen (ped, true) addEventHandler ("onClientPedDamage", ped, cancelEvent) @mhmd.z كودك بيتطبق على جميع الشخصيات الموجوده باللعبه
  4. Event # 'onClientPedDamage' function # createPed getElementType getDistanceBetweenPoints3D isLineOfSightClear setPedControlState 'FindRotation' triggerServerEvent -- Server side # giveWeapon
  5. اللوحه دي اكس ماهي ذيك السهوله بنسبه لك لازم قسمه وضرب عشان تظبط الشاشه هذا اول شي ف تحتاج هذي الفنكشنات التاليه Event # 'onClientRender' function # guiGetScreenSize dxDrawRectangle dxDrawText
  6. window = guiCreateWindow ( ... ) label guiCreateLabel ( ... ) addEventHandler ("onClientResourceStart", resoureRoot, function () guiSetText (label, "Serial: " .. getPlayerSerial ()) end )
  7. شغال الكود معي لازم تكون داخل السياره
  8. addEventHandler ("onClientGUIClick", resourceRoot, function () local veh = getPedOccupiedVehicle (localPlayer) if (veh) then setVehicleLocked (veh, not isVehicleLocked (veh)) end end )
  9. Event # 'onClientGUIClick' function # guiCreateWindow guiCreateButton guiCreateEdit guiCreateLabel guiCreateGridList guiGridListAddRow guiGridListGetSelectedItem guiGridListGetItemText guiGridListSetItemText guiGetText guiSetVisible triggerServerEvent -- Server side # function # getPlayerAccount getAccountName isObjectInACLGroup triggerClientEvent
  10. Client side # StarTech = guiCreateStaticImage(9, 30, 202, 35, "StarTech.png", false) Wagon = guiCreateStaticImage(9, 81, 201, 35, "Wagon.png", false) addEventHandler ("onClientGUIClick", resourceRoot, function () if (source == StarTech) then triggerServerEvent ("warp", localPlayer) end if (source == Wagon) then triggerServerEvent ("warp2", localPlayer) end end ) Server side # local Vehicles = { } addEvent ("warp", true) addEventHandler ("warp", root, function () if isElement (Vehicles [source]) then destroyElement (Vehicles [source]) Vehicles [source] = nil end local x,y,z = getElementPosition (source) Vehicles [source] = createVehicle (405, x,y,z) warpPedIntoVehicle (source, Vehicles [source]) end ) addEvent ("warp2", true) addEventHandler ("warp2", root, function () if isElement (Vehicles [source]) then destroyElement (Vehicles [source]) Vehicles [source] = nil end local x,y,z = getElementPosition (source) Vehicles [source] = createVehicle (499, x,y,z) warpPedIntoVehicle (source, Vehicles [source]) end ) addEventHandler ("onVehicleExplode", resourceRoot, function () destroyElement (source) end ) addEventHandler ("onPlayerQuit", root, function () if isElement (Vehicles [source]) then destroyElement (Vehicles [source]) Vehicles [source] = nil end end )
  11. or = او يعني هو يبي 3 تيمات لو حطيت هذا and يعني الشخص لازم يتواجد بال 3 تيمات بوقت واحد وهذا الشي مستحيل يصير ! or = او يعني اذا كان في هذا او هذا او هذا يسوي الوظيفه فهمت !
  12. Client side # addEventHandler ("onClientGUIClick", resourceRoot, function () if (source == GUIEditor.button[1]) then local swep = guiGridListGetItemText (wep, guiGridListGetSelectedItem (wep), 1) local sply = guiGetText (nameEdit) local samo = guiGetText (amo) if (swep and swep ~= "") then local plrName = getPlayerFromName (spy) if (sply ~= "") then if (tonumber (samo) ~= nil) then if (plrName) then triggerServerEvent ("player", localPlayer, plrName, swep, samo) else outputChatBox ("Player not found.", 255, 0, 0) end else outputChatBox ("Only numbers are allowed.", 255, 0, 0) end else outputChatBox ("You must write a name.", 255, 0, 0) end else outputChatBox ("You must select a weapon.", 255, 0, 0) end end end ) Server side # addEvent ("player", true) addEventHandler ("player", root, function (plr, weapon, ammo) if tonumber (ammo) >= 1 then giveWeapon (plr, weapon, ammo) end end )
  13. if (getTeamName(Team) == "Police" or getTeamName(Team) = "FR" or getTeamName (Team) == "Team3") then
  14. List = { { 'skin',41}, { 'skin2',45 }, { 'skin3',54}, { 'skin4',91 }, } for i, c in ipairs ( List ) do local aRow = guiGridListAddRow ( GridList[1] ) guiGridListSetItemText ( GridList[1], aRow, 1, ''..i..'', false, false ) guiGridListSetItemText ( GridList[1], aRow, 2, c[1], false, false ) guiGridListSetItemColor(GridList[1], aRow, 2, 255, 255, 0, 255) guiGridListSetItemColor(GridList[1], aRow, 1, 0, 255, 255, 255) end addEventHandler("onClientDoubleGUIClick", root , function() if source == GridList[1] then ID = guiGridListGetItemText ( GridList[1], guiGridListGetSelectedItem ( GridList[1] ), 3 ) triggerServerEvent("skin", localPlayer , ID) end end )
  15. وش تبي تسوي بعد ما اللاعب يسجل دخوله ؟
  16. addEvent ("onLogin", true) addEventHandler ("onLogin", root, function (user, pass) local account = getAccount (user, pass) if (account) then if logIn (source, account, pass) then outputChatBox ("You Logged in Sucessfuly With User : #00FF00[ " .. user .. " ]!", source, 255, 255, 0, true) setElementModel (source, 287) triggerClientEvent (source, "HideTheWindow", source) else outputChatBox ("خطا !!", source, 255, 255, 0) end else outputChatBox ("خطا اسم الحساب والباسورد", source, 255, 255, 0) end end ) addEvent ("onRegister", true) addEventHandler ("onRegister", root, function (user, pass) if not getAccount (user) then local account = addAccount (user, pass) if (account) then if logIn (source, user, pass) then outputChatBox ("You Registerd and Logged in Sucessfuly - Please Remember Your User/Password!", source, 255, 255, 0) outputChatBox ("Register Details : [ Username ] : #00FF00" .. user .. " #FFFF1A[ Password ] : #00FF00" .. pass .. "", source, 255, 255, 0 , true) setElementModel (source, 287) triggerClientEvent ( source, "HideTheWindow", source ) else outputChatBox ("Register/Login error!", source, 255, 255, 0) end else outputChatBox ("Account name is already exist.", source, 255, 0, 0) end end end )
  17. GUIEditor = { button = {}, edit = {}, memo = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.button[1] = guiCreateButton(24, 191, 121, 50, "", false) guiSetAlpha(GUIEditor.button[1], 0.00) GUIEditor.button[2] = guiCreateButton(210, 188, 121, 50, "", false) guiSetAlpha(GUIEditor.button[2], 0.00) GUIEditor.memo[1] = guiCreateMemo(622, 0, 178, 401, "Wellcome To The Server ..\n\nاهلا بكم في السيرفر\n\n\n\n\nنشكرك على زياره سرفيرنا ", false) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.edit[1] = guiCreateEdit(145, 37, 144, 23, "", false) GUIEditor.edit[2] = guiCreateEdit(149, 116, 144, 23, "", false) end ) function Dx() dxDrawImage(0, 0, 800, 600, "ddsda.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("UserName :", 20 - 1, 30 - 1, 155 - 1, 70 - 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "top", false, false, false, true, false) dxDrawText("UserName :", 20 + 1, 30 - 1, 155 + 1, 70 - 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "top", false, false, false, true, false) dxDrawText("UserName :", 20 - 1, 30 + 1, 155 - 1, 70 + 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "top", false, false, false, true, false) dxDrawText("UserName :", 20 + 1, 30 + 1, 155 + 1, 70 + 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "top", false, false, false, true, false) dxDrawText("UserName :", 20, 30, 155, 70, tocolor(186, 55, 247, 255), 1.00, "pricedown", "left", "top", false, false, false, true, false) dxDrawText("PassWord :", 20, 109, 155, 149, tocolor(214, 248, 55, 255), 1.00, "pricedown", "left", "top", false, false, false, true, false) dxDrawImage(21, 188, 124, 58, "black-37291_640.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(207, 188, 124, 58, "black-37291_640.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("Login", 23 - 1, 189 - 1, 145 - 1, 246 - 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "center", true, true, false, true, false) dxDrawText("Login", 23 + 1, 189 - 1, 145 + 1, 246 - 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "center", true, true, false, true, false) dxDrawText("Login", 23 - 1, 189 + 1, 145 - 1, 246 + 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "center", true, true, false, true, false) dxDrawText("Login", 23 + 1, 189 + 1, 145 + 1, 246 + 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "center", true, true, false, true, false) dxDrawText("Login", 23, 189, 145, 246, tocolor(186, 55, 247, 255), 1.00, "pricedown", "center", "center", true, true, false, true, false) dxDrawText("Register", 209, 188, 331, 245, tocolor(186, 55, 247, 255), 1.00, "pricedown", "center", "center", true, true, false, true, false) end -------------------------------- addEventHandler("onClientGUIClick",root, function () local user = guiGetText(GUIEditor.edit[1]) local pass = guiGetText(GUIEditor.edit[2]) if ( source == GUIEditor.button[1] ) then if string.len(user) > 0 and string.len(pass) > 0 then triggerServerEvent("onLogin",localPlayer,user,pass) end elseif ( source == GUIEditor.button[2] ) then if string.len(user) > 0 and string.len(pass) > 0 then triggerServerEvent("onRegister",localPlayer,user,pass) 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 bindKey ( "F3", "down", function () if isEventHandlerAdded ("onClientRender", root, Dx) then removeEventHandler("onClientRender",root,Dx) showCursor(false) outputChatBox ( "The Panel Now Is Close !!", 255, 255, 255, true ) else addEventHandler("onClientRender",root,Dx) showCursor(true) outputChatBox ( "The Panel Now Is Open !!", 255, 255, 255, true ) end end)
×
×
  • Create New...