Jump to content

Mr-M3AND

Members
  • Posts

    312
  • Joined

  • Last visited

Details

  • Gang
    None

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Mr-M3AND's Achievements

Prankster

Prankster (22/54)

0

Reputation

  1. function spawnSanchez() local spawnthecar = createVehicle ( 468, 1543.4465332031, -1724.4774169922, 12.546875 ) warpPedIntoVehicle(source, spawnthecar) end local myMarker = createMarker( 1543.4465332031, -1724.4774169922, 12.546875 , "cylinder", 2.0, 250, 250, 250, 200, getRootElement() ) function MarkerHit ( hitPlayer, matchingDimension ) if hitPlayer == localPlayer then outputChatBox ( getPlayerName(hitPlayer) .. " Entered a Died Marker" ) end end function createSpawnWindow(hitPlayer) if hitPlayer == localPlayer then windowSpawncar = guiCreateWindow(0.36, 0.70, 0.26, 0.29, "", true) guiWindowSetSizable(windowSpawncar, false) btnSancheZ = guiCreateButton(0.05, 0.12, 0.87, 0.14, "1: Sanchez", true, windowSpawncar) local font0_PetitFormalScript = guiCreateFont(":guieditor/fonts/PetitFormalScript.ttf", 10) guiSetFont(btnSancheZ, font0_PetitFormalScript) guiSetProperty(btnSancheZ, "NormalTextColour", "FFFFFFFF") btnVoodoo = guiCreateButton(0.05, 0.39, 0.87, 0.14, "2: Voodoo", true, windowSpawncar) guiSetFont(btnVoodoo, font0_PetitFormalScript) guiSetProperty(btnVoodoo, "NormalTextColour", "FFFFFFFF") btnCaddy = guiCreateButton(0.06, 0.67, 0.86, 0.14, "3: Caddy", true, windowSpawncar) guiSetFont(btnCaddy, font0_PetitFormalScript) guiSetProperty(btnCaddy, "NormalTextColour", "FFFFFFFF") guiSetVisible( windowSpawncar, true ) end end addEventHandler ( "onClientMarkerHit", getRootElement(), MarkerHit ) addEventHandler( "onClientMarkerHit", getRootElement(), createSpawnWindow)
  2. try function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end GUIEditor = { checkbox = {}, staticimage = {}, label = {}, button = {}, window = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(542, 254, 348, 92, "No Deathmatch Mode", false) centerWindow ( GUIEditor.window[1] ) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[1] = guiCreateLabel(10, 25, 283, 15, "You can enable or disable 'No Deathmatch' mode.", false, GUIEditor.window[1]) GUIEditor.staticimage[1] = guiCreateStaticImage(10, 50, 34, 26, "icon.png", false, GUIEditor.window[1]) GUIEditor.checkbox[1] = guiCreateCheckBox(49, 52, 234, 24, "Enable / Disable No Deathmatch Mode", false, false, GUIEditor.window[1]) guiSetFont(GUIEditor.checkbox[1], "default-bold-small") GUIEditor.button[1] = guiCreateButton(303, 52, 31, 25, "X", false, GUIEditor.window[1]) guiSetVisible(GUIEditor.window[1], false) addEventHandler("onClientGUIClick", GUIEditor.button[1], onGuiClick,false) addEventHandler("onClientGUIClick",GUIEditor.checkbox[1], checkBox, false) end ) addCommandHandler("nodm", function() guiSetVisible(GUIEditor.window[1], true) showCursor(true) end ) function onGuiClick() guiSetVisible(GUIEditor.window[1], false) showCursor(false) end function checkBox() if ( guiCheckBoxGetSelected(GUIEditor.checkbox[1])) then setElementData(localPlayer, "invincible", true) addEventHandler("onClientRender", root, dxRectangle) else setElementData(localPlayer, "invincible", false) removeEventHandler( "onClientRender", root, dxRectangle ) end end addEventHandler ( "onClientPlayerDamage",localPlayer, function () if getElementData(source,"invincible") then cancelEvent() end end ) function dxRectangle() dxDrawRectangle(84, 475, 220, 32, tocolor(0, 0, 0, 153), false) dxDrawImage(90, 479, 27, 24, "icon.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("No Deathmatch Mode Enabled", 123, 485, 294, 497, tocolor(255, 255, 255, 255), 1.00, "arial", "left", "top", false, false, false, false, false) end function disableWeaponOnGodMod (prev,new) if getElementData(localPlayer, "invincible") then setPedWeaponSlot(localPlayer, 0) toggleControl ( "aim_weapon", false) toggleControl ( "vehicle_fire", false) toggleControl ( "fire", false) else toggleControl ( "aim_weapon", true) toggleControl ( "vehicle_fire", true) toggleControl ( "fire", true) end end addEventHandler ( "onClientRender", root, disableWeaponOnGodMod )
  3. ترا مافهمت سؤالك اذا تقصد قائمة السؤال والجواب شوفها بالجدول بسطر 1 Q_A = { {"جواب", "سؤال"}, {"جواب", "سؤال"} } تحط السؤال وتحط جنبه الاجابه ع السؤال
  4. Q_A = { {"هل ألادمنيين في ألسيرفر متفاعلين او لا ؟", "نعم متفاعلين وهذا قرار أداري"}, {"كيف يمكنني عمل حساب", "إسأل احد الادمنيين وسوف يخبرك كيف"} } local screenW, screenH = guiGetScreenSize() Wind = guiCreateWindow((screenW - 382) / 2, (screenH - 536) / 2, 382, 536, "=[ الادمنيية واسئلتهم ]=", false) guiWindowSetSizable(Wind, false) guiSetProperty(Wind, "CaptionColour", "FFFF0000") guiSetVisible(Wind,false) grid = guiCreateGridList(10, 25, 360, 378, false, Wind) guiGridListAddColumn(grid, "# السؤال", 0.9) Question_Edit = guiCreateEdit(10, 422, 360, 41, "هنا الاجوبة التي تخص الادمن", false, Wind) guiSetProperty(Question_Edit, "NormalTextColour", "FFFF0000") guiEditSetReadOnly(Question_Edit, true) close = guiCreateButton(116, 498, 109, 22, "=[ إغلاق ]=", false, Wind) guiSetFont(close, "default-bold-small") guiSetProperty(close, "NormalTextColour", "FF00FFFC") for i,GR in ipairs(Q_A) do local row = guiGridListAddRow(grid) guiGridListSetItemText(grid,row,1,GR[1],false,false) guiGridListSetItemData(grid,row,1, GR[2]) guiGridListSetItemColor(grid,row,1,math.random(1,255),math.random(2,255),math.random(3,255)) end local key = "F12" function OpenWindow() if guiGetVisible(Wind) == false then guiSetVisible(Wind, true) showCursor(true) else guiSetVisible(Wind, false) showCursor(false) end end bindKey(key,"down",OpenWindow) addEventHandler("onClientGUIClick",root, function () if source == close then if ( guiGetVisible(Wind) == false ) then end guiSetVisible ( Wind, false ) showCursor(false) guiSetInputEnabled(false) end end ) function click () if source == grid then guiSetText (Question_Edit, "هنا الاجوبة التي تخص الادمن" ) end local row,col = guiGridListGetSelectedItem(grid) if ( row and col and row ~= -1 and col ~= -1 ) then local Answers = guiGridListGetItemData ( grid, guiGridListGetSelectedItem ( grid ), 1 ) guiSetText (Question_Edit, Answers ) end end addEventHandler("onClientGUIClick", root, click )
  5. سطر واحد خله كذا screenX, screenY = guiGetScreenSize()
  6. جرب creenX, screenY = guiGetScreenSize() topChat = { {"", 255, 50, 50}, } setTimer(function() table.remove(topChat, 1) end, 10000, 1) addEventHandler("onClientPreRender",root, function() dxDrawRectangle(screenX/4+(screenX/16),screenY*747/768,screenX/2-(screenX/16),21.0,tocolor(0,0,0,150),false) local x, y, z = getElementPosition(localPlayer) dxDrawText(" [Welcome]",screenX/4+(screenX/16),screenY*747/768,screenX*960/1280,screenY*768/768,tocolor(0,0,250),1.0,"default-bold","left","center",false,false,false, true) if #topChat >= 8 then table.remove(topChat, 1) end for k, v in ipairs(topChat) do dxDrawRectangle(screenX/4+(screenX/16),screenY*747/768-(k*20) ,screenX/2-(screenX/16),20.0,tocolor(0,250,0,150),false) dxDrawText(" "..v[1],screenX/4+(screenX/16),screenY*744/768-(k*40) ,screenX*960/1280,screenY*768/768,tocolor(v[2],v[3],v[4],255),1.0,"default-bold","left","center",false,false,false, true) end end ) function outputTopChat(message, r, g, b) table.insert(topChat, { message, r, g, b }) local thetime = getRealTime() outputConsole("["..string.format("%.2d:%.2d:%.2d", thetime.hour, thetime.minute, thetime.second).."] "..message:gsub("#%x%x%x%x%x%x", "")) setTimer(function() table.remove(topChat, 1) end, 60000, 1) end addEvent("outputTopChat", true) addEventHandler("outputTopChat", root, outputTopChat)
  7. Mr-M3AND

    Help plis

    font name : Thing Press download : http://dl.1001fonts.com/thing-press.zip
  8. طبعا مو معرف لانه مثال تضيفه لكودك وتعرفه
  9. setTimer( function () local r, g, b = math.random(255), math.random(255), math.random(255) guiGridListSetItemColor ( gridlist, row , 1, r, g, b ) end, 1000, 0) row = ? gridlist = ? طيب افرض ان الرجال عنده 4 رو كيف تبيه يلون واحد ويخلي 3 لازم تستخدم اللوب لا مايحتاج لوب الكود يلون كل الرو بالقريد ليست row يصير تلون الرو بالحاله اذا استبدلت كلمة بـ رقم 0 = الرو الاول مثلا تبي تلون الرو الرابع تحط رقم 3
  10. setTimer( function () local r, g, b = math.random(255), math.random(255), math.random(255) guiGridListSetItemColor ( gridlist, row , 1, r, g, b ) end, 1000, 0)
  11. -- Client -- local weapon = {sound = {}} addEvent("onCreateWeaponVehicle", true) addEventHandler("onCreateWeaponVehicle", root, function (weaponID) local theVehicle = source if not weaponID then weaponID= 38 end if (getElementType(theVehicle) == "vehicle") and not (weapon[theVehicle]) then local x, y, z = getElementPosition(theVehicle) weapon[theVehicle] = createWeapon(weaponID, x, y, z) attachElements(weapon[theVehicle], theVehicle, -0.13, -0.54, 1.03, 0, 0, 90) setElementData(theVehicle, "VehicleMG", weapon[theVehicle]) setElementAlpha(weapon[theVehicle], 0) setWeaponClipAmmo(weapon[theVehicle], 99999) end end) addEvent("onRemoveWeaponVehicle", true) addEventHandler("onRemoveWeaponVehicle", root, function ( ) local theVehicle = source if (getElementType(theVehicle) == "vehicle") and (weapon[theVehicle]) then destroyElement (weapon[theVehicle]) end end) addEvent("onWeaponVehicleFiring", true) addEventHandler("onWeaponVehicleFiring", root, function( ) local theVehicle = source if (theVehicle) and (weapon[theVehicle]) then setWeaponState(weapon[theVehicle], "firing") local x, y, z = getElementPosition(theVehicle) local xm, ym, zm = getElementPosition(weapon[theVehicle]) if not (weapon.sound[theVehicle]) then weapon.sound[theVehicle] = playSound3D("minigun.wav", xm, ym, zm, true) setSoundMaxDistance(weapon.sound[theVehicle], 100) setSoundEffectEnabled(weapon.sound[theVehicle], "gargle", true) attachElements(weapon.sound[theVehicle], weapon[theVehicle]) end end end) addEvent("onWeaponVehicleReady", true) addEventHandler("onWeaponVehicleReady", root, function ( ) local theVehicle = source if (theVehicle) and (weapon[theVehicle]) then setWeaponState(weapon[theVehicle], "ready") if (weapon.sound[theVehicle]) then stopSound(weapon.sound[theVehicle]) weapon.sound[theVehicle] = nil end end end) bindKey("r", "up", function( ) local theVehicle = getPedOccupiedVehicle(localPlayer) if (theVehicle) and (getVehicleController(theVehicle) == thePlayer) then setWeaponState(weapon[theVehicle], "reloading") end end) addEventHandler("onClientWeaponFire", getRootElement(), function (element) local theVehicle = getPedOccupiedVehicle(localPlayer) if (theVehicle) and (weapon[theVehicle]) then if (element == theVehicle) then cancelEvent() end end end) addEventHandler("onElementDestroy", root, function ( ) local theVehicle = source if (getElementType(theVehicle) == "vehicle") and (weapon[theVehicle]) then destroyElement (weapon[theVehicle]) weapon[theVehicle] = nil setElementData(theVehicle, "VehicleMG", false) end end) -- Server -- function onEnter(thePlayer) local theVehicle = getPedOccupiedVehicle(thePlayer) if ( getElementModel ( theVehicle ) == 600 ) then if (getVehicleController(theVehicle) == thePlayer) then triggerClientEvent("onCreateWeaponVehicle", theVehicle, id) end end end addEventHandler ( "onVehicleEnter", getRootElement(), onEnter ) function onExit(thePlayer) if ( getElementModel ( source ) == 600 ) then triggerClientEvent("onRemoveWeaponVehicle", source ) end end addEventHandler ( "onVehicleExit", getRootElement(), onExit ) addEventHandler("onResourceStart", root, function( ) for i, player in ipairs(getElementsByType("player")) do bindKey(player, "vehicle_secondary_fire", "down", keyFire) bindKey(player, "vehicle_secondary_fire", "up", keyStopFire) end end) function keyFire(source) local theVehicle = getPedOccupiedVehicle(source) if (theVehicle) and (getVehicleController(theVehicle) == source) then triggerClientEvent("onWeaponVehicleFiring", theVehicle) end end function keyStopFire(source) local theVehicle = getPedOccupiedVehicle(source) if (theVehicle) and (getVehicleController(theVehicle) == source) then triggerClientEvent("onWeaponVehicleReady", theVehicle) end end
  12. RAR الملف بصيغه ZIP لازم يكون بصيغه
  13. for _, d in pairs ( modelki ) do local x, y, z, rx, ry, rz, int, dim, skin = unpack(d) addEventHandler ( "onResourceStart", resourceRoot, function ( ) local ped = createPed ( skin, x, y, z ) setElementRotation ( ped, rx, ry, rz ) setElementInterior ( ped, int ) setElementDimension ( ped, dim ) setElementFrozen ( ped, true ) setElementData ( ped, "modelka", true ) end ) local marker = createMarker ( x + 1, y, z - 1, "cylinder", 1, 255, 51, 255, 50 ) addEventHandler ( "onMarkerHit", marker, function ( hitMarker ) outputChatBox ( "test" ) if ( isElement ( hitMarker ) and getElementType ( hitMarker ) == "player" ) then outputChatBox ( "test1" ) podejmijPrace ( hitMarker, skin ) end end ) end
×
×
  • Create New...