Jump to content

al-Kobra

Members
  • Posts

    740
  • Joined

  • Last visited

Everything posted by al-Kobra

  1. 'onPlayerTarget' bindKey getElementPosition getDistanceBetweenPoints3D getPedWeapon getPedTotalAmmo takeWeapon giveWeapon
  2. يحدد عليه ويضرب زر تاب .؟ انتبه يبي يسرق افكارك هه / دعـأبةةة وثـأني شي وش يضرب اسمها يضغط خلوكم اتكيـت بألـتوفيق لكك صراحه اكـثر الاشخـأص يشيلون الحـقوق جت عليه هو وانا يعني م ابي اكون كذاب الحق اني لا كان الحقوق شكلها بايخ او كذا او صاحب المود حاط حقوق في مكان مو مناسب لي اشيلها لكن مستحيل مستحيل احط حقوقي اخليها بدون حقوق ومستحيل استخدم مود لـو هو عاجبني مره بس الاي مخربه الحقوق وهو مششفر م استخدمه و كثير حذفتها وانا ابيها بس الحقوق مخربه شكل السيرفر كامل "-_-
  3. شلون يسرق فلوس اللاعب ؟؟ يحدد عليه ويضرب حرف ؟
  4. function createVehicleSelection ( ) local sWidth, sHeight = guiGetScreenSize() local Width,Height = 328,537 local X = (sWidth/2) - (Width/2) local Y = (sHeight/2) - (Height/2) windowVehicleShop = guiCreateWindow(X,Y,Width,Height,"Vehicle Shop",false) gridlistVehicleShop = guiCreateGridList(9, 82, 308, 406, false, windowVehicleShop) guiGridListAddColumn(gridlistVehicleShop, "Name", 0.3) guiGridListAddColumn(gridlistVehicleShop, "Price", 0.3) guiGridListAddColumn(gridlistVehicleShop, "ID", 0.3) guiSetVisible(windowVehicleShop,false) guiWindowSetSizable(windowVehicleShop, false) guiCreateStaticImage(53, 29, 223, 49, "images/vehicleshop.png", false, windowVehicleShop) buttonBuy = guiCreateButton(9, 498, 147, 29, "Buy", false, windowVehicleShop) buttonCancel = guiCreateButton(172, 498, 146, 29, "Cancel", false, windowVehicleShop) addEventHandler("onClientGUIClick",buttonBuy, createVehicleHandler, false) addEventHandler("onClientGUIClick",buttonCancel, closeVehicleShop, false) populateGridList( ) end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()), function() createVehicleSelection() end ) local marker = createMarker ( 1671.2398681641, 1814.2731933594, 9.50, "cylinder", 1.5 ) setMarkerColor ( marker, 255, 255, 255, 255 ) function showVehicleSelection( hitElement ) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(windowVehicleShop) then guiSetVisible(windowVehicleShop, true) showCursor(true) populateGridList( ) end end end addEventHandler( "onClientMarkerHit", marker, showVehicleSelection ) function closeVehicleShop () guiSetVisible ( windowVehicleShop, false ) showCursor( false ) end addEventHandler( "onClientGUIClick", buttonCancel, closeVehicleShop, false ) Vehicles = { {'Ford',10000,602}, -- {carName,Price,ID} } function populateGridList ( ) local file = xmlLoadFile ( "data/vehs.xml" ) if ( not file ) then assert ( file, "Fail to load vehs.xml" ) else local children = xmlNodeGetChildren ( file ) for _,child in ipairs ( children ) do local attrs = xmlNodeGetAttributes ( child ) local ID, Name, Price = attrs.id, attrs.name, attrs.price if ( not Name ) then outputDebugString ( "name attribute not set for item", 2 ) end if ( not Price ) then outputDebugString ( "cash attribute not set for item", 2 ) end if ( not ID ) then outputDebugString ( "score attribute not set for item", 2 ) end for k,v in ipairs(Vehicles) do local itemRow = guiGridListAddRow(gridlistVehicleShop) guiGridListSetItemText (gridlistVehicleShop,itemRow,1,v[1],false,false) guiGridListSetItemText (gridlistVehicleShop,itemRow,2,v[2],false,false) guiGridListSetItemData ( gridlistVehicleShop,itemRow,2,v[2]) guiGridListSetItemData ( gridlistVehicleShop,itemRow,1,v[3]) end end xmlUnloadFile ( file ) end end addEventHandler('onClientGUIClick',root, function() if source == buttonBuy then if guiGridListGetSelectedItem(gridlistVehicleShop) ~= -1 then local car = guiGridListGetItemData ( gridlistVehicleShop,guiGridListGetSelectedItem ( gridlistVehicleShop ), 1) local price = guiGridListGetItemData ( gridlistVehicleShop,guiGridListGetSelectedItem ( gridlistVehicleShop ), 2) triggerServerEvent('CreateCarForPlayer',localPlayer,car,price) elseif source == buttonCancel then guiSetVisible (windowVehicleShop, false) showCursor (false) end end end ) -- Server Side # local vehicle = {} addEvent('CreateCarForPlayer',true) addEventHandler('CreateCarForPlayer',root,function(model,price) if getPlayerMoney(source) >= tonumber(price) then if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end local x,y,z = getElementPosition(source) vehicle[source] = createVehicle(tonumber(model),x,y,z) warpPedIntoVehicle(source,vehicle[source]) takePlayerMoney(source,tonumber(price)) end end ) addEventHandler('onPlayerQuit',root,function() if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end end ) Try this
  5. addEventHandler ("onClientGUIClick", root, function ( ) if (source == GUIEditor.button[1]) then local gWep = guiGetText (GUIEditor.edit[1]) if gWep ~= '' then guiSetText ( GUIEditor.memo[1], gWep ) end end end ) guiMemoSetReadOnly(GUIEditor.memo[1], true)
  6. وش ذا انا سويته خلاصص هذا هو الا اذا كتبت في الادت وطرشته يجي في الميمو
  7. addEvent("kobra1", true) addEventHandler("kobra1", root, function() if (getPlayerMoney (source) >= 300) then takePlayerMoney(source, 300) giveWeapon ( source, 30, 4500 ) outputChatBox ( "You Have Bought an AK-47 Weapon", source, 255, 255, 255, true ) outputChatBox("#999999** #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) else outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) end end ) addEvent("kobra2", true) addEventHandler("kobra2", root, function() if (getPlayerMoney (source) >= 450) then takePlayerMoney(source, 0) giveWeapon ( source, 31, 4500 ) outputChatBox ( "You Have Bought a M4 Weapon", source, 255, 255, 255, true ) outputChatBox("#999999** #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) else outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) end end ) addEvent("kobra3", true) addEventHandler("kobra3", root, function() if (getPlayerMoney (source) >= 550) then takePlayerMoney(source, 550) giveWeapon ( source, 22, 4500 ) outputChatBox ( "You Have Bought a Pistol Weapon", source, 255, 255, 255, true ) outputChatBox("#999999** #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) else outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) end end ) addEvent("kobra4", true) addEventHandler("kobra4", root, function() if (getPlayerMoney (source) >= 1000) then takePlayerMoney(source, 1000) giveWeapon ( source, 25, 4500 ) outputChatBox ( "You Have Bought a Shotgun Weapon", source, 255, 255, 255, true ) outputChatBox("#999999** #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) else outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) end end ) addEvent("kobra5", true) addEventHandler("kobra5", root, function() if (getPlayerMoney (source) >= 1500) then takePlayerMoney(source, 1500) giveWeapon ( source, 16, 300 ) outputChatBox ( "You Have Bought a Grenade Weapon", source, 255, 255, 255, true ) outputChatBox("#999999** #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) else outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) end end ) addEvent("kobra6", true) addEventHandler("kobra6", root, function() if (getPlayerMoney (source) >= 3000) then takePlayerMoney(source, 3000) giveWeapon ( source, 18, 350 ) outputChatBox ( "You Have Bought a Molotov Weapon", source, 255, 255, 255, true ) outputChatBox("#999999** #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) else outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) end end ) addEvent("kobra7", true) addEventHandler("kobra7", root, function() if (getPlayerMoney (source) >= 5000) then takePlayerMoney(source, 5000) giveWeapon ( source, 38, 7500 ) outputChatBox ( "You Have Bought a Minigun Weapon", source, 255, 255, 255, true ) outputChatBox("#999999** #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) else outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) end end ) local markers = { } addCommandHandler( "open", function( player ) if isElement( markers[player] ) then destroyElement(markers[player] ) end local pTeam = getPlayerTeam ( player ) if pTeam and getTeamName ( pTeam ) == "Robbers" then local x,y,z = getElementPosition( player ) markers[player] = createMarker( x, y + 3, z, "cylinder", 3,255, 0, 2, 255 ) setElementData( markers[player], "Creater", player ) end end ) addEventHandler( "onMarkerHit", resourceRoot, function( hitElement ) if getElementType( hitElement ) == "player" then triggerClientEvent( hitElement, "open_window", hitElement, source ) end end ) addEventHandler("onMarkerLeave", resourceRoot, function( leftElement ) if getElementType( leftElement ) == "player" then triggerClientEvent( leftElement, "close_window", leftElement, source ) end end )
  8. addEventHandler("onClientResourceStart", root, function () local mm = getElementHealth ( localPlayer ) setTimer ( setElementHealth, 10000, 0, localPlayer, mm + 20 ) end ) جرب هذا
  9. addEventHandler ("onClientGUIClick", root, function () if source == "اسم الزر" then guiSetVisible ( اسم اللوحة, false ) end end )
  10. مافهمتك تحت مكتوب AR اقصد في الشريط مال الستارت اضرب عليها بعدين بتطلع لك قائمة بعدين اختار show language bar بعدين بتطلع لك القائمة فوق اضرب على السهم الا كذا v بعدين بتطلع لك قائمة واختار setting وبعدين انت كمل ذذ
  11. addCommandHandler createMarker getDistanceBetweenPoints3D setElementData table.insert -- مو متأكد منها destroyElement وفي طريقة ثانية تقدر تسوي ماركر في نفس الماركر لكن صغير ,, واذا دخله مايقدر يسوي ماركر واذا طلع من الماركر يقدر يسوي
  12. تأكد انك مسميه بالضبط مثل الا في الميتا ,, يعني الكابيتل كابيتل والسمول سمول
  13. addEvent("kobra1", true) addEventHandler("kobra1", root, function() if (getPlayerMoney (source) >= 300) then takePlayerMoney(source, 300) giveWeapon ( source, 30, 4500 ) outputChatBox ( "You Have Bought an AK-47 Weapon", source, 255, 255, 255, true ) outputChatBox("#999999** #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) else outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) end end ) addEvent("kobra2", true) addEventHandler("kobra2", root, function() if (getPlayerMoney (source) >= 450) then takePlayerMoney(source, 0) giveWeapon ( source, 31, 4500 ) outputChatBox ( "You Have Bought a M4 Weapon", source, 255, 255, 255, true ) outputChatBox("#999999** #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) else outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) end end ) addEvent("kobra3", true) addEventHandler("kobra3", root, function() if (getPlayerMoney (source) >= 550) then takePlayerMoney(source, 550) giveWeapon ( source, 22, 4500 ) outputChatBox ( "You Have Bought a Pistol Weapon", source, 255, 255, 255, true ) outputChatBox("#999999** #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) else outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) end end ) addEvent("kobra4", true) addEventHandler("kobra4", root, function() if (getPlayerMoney (source) >= 1000) then takePlayerMoney(source, 1000) giveWeapon ( source, 25, 4500 ) outputChatBox ( "You Have Bought a Shotgun Weapon", source, 255, 255, 255, true ) outputChatBox("#999999** #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) else outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) end end ) addEvent("kobra5", true) addEventHandler("kobra5", root, function() if (getPlayerMoney (source) >= 1500) then takePlayerMoney(source, 1500) giveWeapon ( source, 16, 300 ) outputChatBox ( "You Have Bought a Grenade Weapon", source, 255, 255, 255, true ) outputChatBox("#999999** #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) else outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) end end ) addEvent("kobra6", true) addEventHandler("kobra6", root, function() if (getPlayerMoney (source) >= 3000) then takePlayerMoney(source, 3000) giveWeapon ( source, 18, 350 ) outputChatBox ( "You Have Bought a Molotov Weapon", source, 255, 255, 255, true ) outputChatBox("#999999** #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) else outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) end end ) addEvent("kobra7", true) addEventHandler("kobra7", root, function() if (getPlayerMoney (source) >= 5000) then takePlayerMoney(source, 5000) giveWeapon ( source, 38, 7500 ) outputChatBox ( "You Have Bought a Minigun Weapon", source, 255, 255, 255, true ) outputChatBox("#999999** #ffffff[#1569c7" .. getPlayerName(source) .. "#ffffff] #1569c7 Has Bought #ffffff[#1569c7Pistol#ffffff]", getRootElement(), 0, 0, 0, true) else outputChatBox("* You Don't Have Enough Money", source, 255, 0, 0, true) end end ) local markers = { } addCommandHandler( "open", function( player ) if isElement( markers[player] ) then destroyElement(markers[player] ) end local pTeam = getPlayerTeam ( source ) if pTeam and getTeamName ( pTeam ) == "Robbers" then local x,y,z = getElementPosition( player ) markers[player] = createMarker( x, y+1, z, "cylinder", 3,255, 0, 2, 255 ) setElementData( markers[player], "Creater", player ) end end ) addEventHandler( "onMarkerHit", resourceRoot, function( hitElement ) if getElementType( hitElement ) == "player" then triggerClientEvent( hitElement, "open_window", hitElement, source ) end end ) addEventHandler("onMarkerLeave", resourceRoot, function( leftElement ) if getElementType( leftElement ) == "player" then triggerClientEvent( leftElement, "close_window", leftElement, source ) end end )
×
×
  • Create New...