Jump to content

Max+

Members
  • Posts

    1,363
  • Joined

  • Last visited

Everything posted by Max+

  1. the trigger Problem is this , if getElementType( hitElement ) == "player" then if isPlayerInVehicle( hitElement ) then if you want it trigger when the player in the vehicle , then no need for getElementType = 'player' remove it , and test it see how it goes ,
  2. ليه تعقدها والاوامر كلها مشتركة ماله داعي التريقر . . بأمكانك تحوله كله كلينت هههههههههههههههههه زاحف ياحبي لك
  3. جرب الكود حقي بالصفحة الاولى . . ..
  4. Event ' onClientRender' getPlayerPing setElementData getElementData dxDrawImage setTimer واذا تبي بعد التحقق يطرد اذا عالي واذا نزل يشيل الطرد ؟ kickPlayer killTimer
  5. ? resourceRoot onClientPlayerJoin تحط بـ حدث تم التعديل ., وبالنسبة للرسيوس روت , , عادي مايسوي مشاكل , وتقدر تجرب السكربت . .
  6. ??????????????? هو يقول عدد اللاعبين .. انت جالس تحط اللاعبين باللبل لول طيب لاتزعل : ( عدلته : (
  7. -- انا احب اعقدها بطريقة ثانية . . local myLabel = guiCreateLabel ( 0, 0, 1, 1, "", true ) function players ( ) Max = #getElementsByType("player") guiSetText ( myLabel, "Count Players In Server"..Max ) end addEventHandler ( 'onClientPlayerJoin', resourceRoot, players ) addEventHandler ( 'onClientPlayerQuit', resourceRoot, players ) addEventHandler('onClientResourceStart', resourceRoot, function ( ) setTimer ( players, 1000, 1 ) end ) للعلم يمديك تسويها بــ 3 طرق مختلفة , تم التعديل #
  8. Your Code , is very Messy Forgive me if i forgot anything , or it didn't work becuase i dont know what is the inside marker and outside marker and the buy marker . . there is 7 markers ! --ClientSide, GUIEditor = { tab = {}, staticimage = {}, tabpanel = {}, button = {}, window = {} } function makeGui ( ) showCursor ( true ) GUIEditor.window[1] = guiCreateWindow(270, 100, 800, 600, "Ammunation", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.staticimage[1] = guiCreateStaticImage(130, 40, 500, 500, ":ammunation/files/mira.png", false, GUIEditor.window[1]) GUIEditor.tabpanel[1] = guiCreateTabPanel(25, 20, 750, 565, false, GUIEditor.window[1]) guiSetAlpha(GUIEditor.tabpanel[1], 0.90) guiSetAlpha(GUIEditor.staticimage[1], 0.99) GUIEditor.tab[1] = guiCreateTab("Armas", GUIEditor.tabpanel[1]) GUIEditor.staticimage[15] = guiCreateStaticImage(50, 50, 100, 100, ":ammunation/files/8.png", false, GUIEditor.tab[1]) GUIEditor.staticimage[16] = guiCreateStaticImage(190, 380, 100, 100, ":ammunation/files/2.png", false, GUIEditor.tab[1]) GUIEditor.staticimage[17] = guiCreateStaticImage(330, 215, 100, 100, ":ammunation/files/11.png", false, GUIEditor.tab[1]) GUIEditor.staticimage[18] = guiCreateStaticImage(470, 50, 100, 100, ":ammunation/files/5.png", false, GUIEditor.tab[1]) GUIEditor.staticimage[19] = guiCreateStaticImage(610, 50, 100, 100, ":ammunation/files/6.png", false, GUIEditor.tab[1]) GUIEditor.staticimage[20] = guiCreateStaticImage(50, 215, 100, 100, ":ammunation/files/9.png", false, GUIEditor.tab[1]) GUIEditor.staticimage[21] = guiCreateStaticImage(50, 380, 100, 100, ":ammunation/files/10.png", false, GUIEditor.tab[1]) GUIEditor.staticimage[22] = guiCreateStaticImage(190, 50, 100, 100, ":ammunation/files/4.png", false, GUIEditor.tab[1]) GUIEditor.staticimage[24] = guiCreateStaticImage(190, 215, 100, 100, ":ammunation/files/1.png", false, GUIEditor.tab[1]) GUIEditor.staticimage[25] = guiCreateStaticImage(330, 50, 100, 100, ":ammunation/files/12.png", false, GUIEditor.tab[1]) GUIEditor.staticimage[26] = guiCreateStaticImage(330, 380, 100, 100, ":ammunation/files/13.png", false, GUIEditor.tab[1]) GUIEditor.staticimage[27] = guiCreateStaticImage(470, 215, 100, 100, ":ammunation/files/7.png", false, GUIEditor.tab[1]) GUIEditor.staticimage[23] = guiCreateStaticImage(610, 215, 100, 100, ":ammunation/files/3.png", false, GUIEditor.tab[1]) b1 = guiCreateButton(50, 155, 100, 50, "Pistol", false, GUIEditor.tab[1]) guiSetProperty(b1, "NormalTextColour", "FFFFFFFF") b2 = guiCreateButton(190, 155, 100, 50, "Shotgun", false, GUIEditor.tab[1]) guiSetProperty(b2, "NormalTextColour", "FFFFFFFF") b3 = guiCreateButton(330, 155, 100, 50, "Uzi", false, GUIEditor.tab[1]) guiSetProperty(b3, "NormalTextColour", "FFFFFFFF") b4 = guiCreateButton(470, 155, 100, 50, "M4", false, GUIEditor.tab[1]) guiSetProperty(b4, "NormalTextColour", "FFFFFFFF") b5 = guiCreateButton(610, 155, 100, 50, "Sniper Rifle", false, GUIEditor.tab[1]) guiSetProperty(b5, "NormalTextColour", "FFFFFFFF") b6 = guiCreateButton(50, 320, 100, 50, "Silenced Pistol", false, GUIEditor.tab[1]) guiSetProperty(b6, "NormalTextColour", "FFFFFFFF") b7 = guiCreateButton(190, 320, 100, 50, "SPAZ-12 Combat", false, GUIEditor.tab[1]) guiSetProperty(b7, "NormalTextColour", "FFFFFFFF") b8 = guiCreateButton(330, 320, 100, 50, "TEC-9", false, GUIEditor.tab[1]) guiSetProperty(b8, "NormalTextColour", "FFFFFFFF") b9 = guiCreateButton(470, 320, 100, 50, "AK-47", false, GUIEditor.tab[1]) guiSetProperty(b9, "NormalTextColour", "FFFFFFFF") b10 = guiCreateButton(610, 320, 100, 50, "Country Rifle", false, GUIEditor.tab[1]) guiSetProperty(b10, "NormalTextColour", "FFFFFFFF") b11 = guiCreateButton(50, 480, 100, 50, "Desert Eagle", false, GUIEditor.tab[1]) guiSetProperty(b11, "NormalTextColour", "FFFFFFFF") b12 = guiCreateButton(190, 480, 100, 50, "Sawn-Off", false, GUIEditor.tab[1]) guiSetProperty(b12, "NormalTextColour", "FFFFFFFF") b13 = guiCreateButton(330, 480, 100, 50, "MP5", false, GUIEditor.tab[1]) guiSetProperty(b13, "NormalTextColour", "FFFFFFFF") GUIEditor.button[15] = guiCreateButton(50, 15, 100, 35, "HandGuns", false, GUIEditor.tab[1]) guiSetProperty(GUIEditor.button[15], "NormalTextColour", "FFFFFFFF") GUIEditor.button[16] = guiCreateButton(190, 15, 100, 35, "ShotGuns", false, GUIEditor.tab[1]) guiSetProperty(GUIEditor.button[16], "NormalTextColour", "FFFFFFFF") GUIEditor.button[17] = guiCreateButton(330, 15, 100, 35, "Sub-Machine", false, GUIEditor.tab[1]) guiSetProperty(GUIEditor.button[17], "NormalTextColour", "FFFFFFFF") GUIEditor.button[18] = guiCreateButton(470, 15, 100, 35, "Assault Rifles", false, GUIEditor.tab[1]) guiSetProperty(GUIEditor.button[18], "NormalTextColour", "FFFFFFFF") GUIEditor.button[19] = guiCreateButton(610, 15, 100, 35, "Rifles", false, GUIEditor.tab[1]) guiSetProperty(GUIEditor.button[19], "NormalTextColour", "FFFFFFFF") GUIEditor.button[20] = guiCreateButton(630, 475, 100, 50, "Sair", false, GUIEditor.tab[1]) guiSetProperty(GUIEditor.button[20], "NormalTextColour", "FFFF0000") GUIEditor.tab[2] = guiCreateTab("Equipamentos", GUIEditor.tabpanel[1]) GUIEditor.staticimage[13] = guiCreateStaticImage(50, 50, 100, 100, ":ammunation/files/colete.png", false, GUIEditor.tab[2]) GUIEditor.staticimage[14] = guiCreateStaticImage(190, 45, 110, 110, ":ammunation/files/16.png", false, GUIEditor.tab[2]) GUIEditor.button[7] = guiCreateButton(50, 10, 100, 35, "Colete", false, GUIEditor.tab[2]) guiSetProperty(GUIEditor.button[7], "NormalTextColour", "FFFFFFFF") GUIEditor.button[8] = guiCreateButton(190, 10, 100, 35, "Paraquedas", false, GUIEditor.tab[2]) guiSetProperty(GUIEditor.button[8], "NormalTextColour", "FFFFFFFF") GUIEditor.button[9] = guiCreateButton(50, 155, 100, 50, "Comprar", false, GUIEditor.tab[2]) guiSetProperty(GUIEditor.button[9], "NormalTextColour", "FFFFFFFF") GUIEditor.button[10] = guiCreateButton(190, 155, 100, 50, "Comprar", false, GUIEditor.tab[2]) guiSetProperty(GUIEditor.button[10], "NormalTextColour", "FFFFFFFF") GUIEditor.button[11] = guiCreateButton(630, 475, 100, 50, "Sair", false, GUIEditor.tab[2]) guiSetProperty(GUIEditor.button[11], "NormalTextColour", "FFFF0000") guiSetVisible ( GUIEditor.window[1], false ) end addEventHandler("onClientRender", root, function() dxDrawRectangle(466, 207, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawText("", 488, 217, 488, 217, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false) dxDrawRectangle(466, 207, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawText("", 488, 217, 488, 217, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false) dxDrawRectangle(466, 207, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawText("", 488, 217, 488, 217, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false) dxDrawRectangle(466, 207, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawText("", 488, 217, 488, 217, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false) dxDrawRectangle(466, 207, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawText("", 488, 217, 488, 217, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false) dxDrawRectangle(466, 207, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawText("", 488, 217, 488, 217, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false) end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == b1 ) then triggerServerEvent("pistol",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == b2 ) then triggerServerEvent("shotgun",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == b3 ) then triggerServerEvent("uzi",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == b4 ) then triggerServerEvent("m4",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == b5 ) then triggerServerEvent("sniper",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == b6 ) then triggerServerEvent("spistol",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == b7 ) then triggerServerEvent("combat",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == b8 ) then triggerServerEvent("tec",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == b9 ) then triggerServerEvent("ak",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == b10 ) then triggerServerEvent("country",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == b11 ) then triggerServerEvent("eagle",getLocalPlayer()) end end
  9. ماشاء الله طيب واحد طلع ؟ واحد دخل كيف ناوي تحدث البيانات ؟ ولا الفنكشن ذا يضبط وضعك ؟
  10. i Know it's serverSide , you Can use triggerServerEvent for startResource stopResource Becuase They Are ServerSide Only
  11. ماشاء الله لو البرمجة كذا كان كلنا ريحنا روسنا . . شوف رد اللي فوقك هو الصحيح . .
  12. هات اسم الماب + تبي يوم تضرب الدبابه بدبابة ثانية طلقه وحده تنفجر ؟ + debugscript 3 وش طلع لك ؟
  13. Try This , / debugscript 3 addEvent("parachute",true) addEventHandler("parachute",root, function() if ( getPlayerMoney(source) >= 100) then takePlayerMoney(source,100) giveWeapon ( source , 46, 1) setPedWeaponSlot(source, getSlotFromWeapon(46)) local name = getPlayerName(source) outputChatBox ( "#ffffff" .. name .. " #ff0000 Você comprou Parachute", getRootElement(), 255, 0, 0, true ) else outputChatBox("#ff0000 Dinheiro insuficiente", source, 255, 0, 0, true) end end ) addEvent("colete",true) addEventHandler("colete",root, function() if ( getPlayerMoney(source) >= 100) then takePlayerMoney(source,100) setPedArmor ( source, 100 ) local name = getPlayerName(source) outputChatBox ( "#ffffff" .. name .. " #ff0000 Você comprou Colete", getRootElement(), 255, 0, 0, true ) else outputChatBox("#ff0000 Dinheiro insuficiente", source, 255, 0, 0, true) end end ) addEvent("pistol",true) addEventHandler("pistol",root, function() if ( getPlayerMoney(source) >= 100) then takePlayerMoney(source,100) giveWeapon ( source , 22,700 ) setPedWeaponSlot(source, getSlotFromWeapon(22)) local name = getPlayerName(source) outputChatBox ( "#ffffff" .. name .. " #ff0000 Você comprou Pistol", getRootElement(), 255, 0, 0, true ) else outputChatBox("#ff0000 Dinheiro insuficiente", source, 255, 0, 0, true) end end ) addEvent("shotgun",true) addEventHandler("shotgun",root, function() if ( getPlayerMoney(source) >= 100) then takePlayerMoney(source,100) giveWeapon ( source , 25,700 ) setPedWeaponSlot(source, getSlotFromWeapon(25)) local name = getPlayerName(source) outputChatBox ( "#ffffff" .. name .. " #ff0000 Você comprou Shotgun", getRootElement(), 255, 0, 0, true ) else outputChatBox("#ff0000 Dinheiro insuficiente", source, 255, 0, 0, true) end end ) addEvent("uzi",true) addEventHandler("uzi",root, function() if ( getPlayerMoney(source) >= 100) then takePlayerMoney(source,100) giveWeapon ( source , 28,700 ) setPedWeaponSlot(source, getSlotFromWeapon(28)) local name = getPlayerName(source) outputChatBox ( "#ffffff" .. name .. " #ff0000 Você comprou Uzi", getRootElement(), 255, 0, 0, true ) else outputChatBox("#ff0000 Dinheiro insuficiente", source, 255, 0, 0, true) end end ) addEvent("m4",true) addEventHandler("m4",root, function() if ( getPlayerMoney(source) >= 100) then takePlayerMoney(source,100) giveWeapon ( source , 31,700 ) setPedWeaponSlot(source, getSlotFromWeapon(31)) local name = getPlayerName(source) outputChatBox ( "#ffffff" .. name .. " #ff0000 Você comprou M4", getRootElement(), 255, 0, 0, true ) else outputChatBox("#ff0000 Dinheiro insuficiente", source, 255, 0, 0, true) end end ) addEvent("sniper",true) addEventHandler("sniper",root, function() if ( getPlayerMoney(source) >= 100) then takePlayerMoney(source,100) giveWeapon ( source , 34,700 ) setPedWeaponSlot(source, getSlotFromWeapon(34)) local name = getPlayerName(source) outputChatBox ( "#ffffff" .. name .. " #ff0000 Você comprou Sniper Rifle", getRootElement(), 255, 0, 0, true ) else outputChatBox("#ff0000 Dinheiro insuficiente", source, 255, 0, 0, true) end end ) addEvent("spistol",true) addEventHandler("spistol",root, function() if ( getPlayerMoney(source) >= 100) then takePlayerMoney(source,100) giveWeapon ( source , 23,700 ) setPedWeaponSlot(source, getSlotFromWeapon(23)) local name = getPlayerName(source) outputChatBox ( "#ffffff" .. name .. " #ff0000 Você comprou Silenced Pistol", getRootElement(), 255, 0, 0, true ) else outputChatBox("#ff0000 Dinheiro insuficiente", source, 255, 0, 0, true) end end ) addEvent("combat",true) addEventHandler("combat",root, function() if ( getPlayerMoney(source) >= 100) then takePlayerMoney(source,100) giveWeapon ( source , 27,700 ) setPedWeaponSlot(source, getSlotFromWeapon(27)) local name = getPlayerName(source) outputChatBox ( "#ffffff" .. name .. " #ff0000 Você comprou SPAZ-12 Combat Shotgun ", getRootElement(), 255, 0, 0, true ) else outputChatBox("#ff0000 Dinheiro insuficiente", source, 255, 0, 0, true) end end ) addEvent("tec",true) addEventHandler("tec",root, function() if ( getPlayerMoney(source) >= 100) then takePlayerMoney(source,100) giveWeapon ( source , 32,700 ) setPedWeaponSlot(source, getSlotFromWeapon(32)) local name = getPlayerName(source) outputChatBox ( "#ffffff" .. name .. " #ff0000 Você comprou TEC-9", getRootElement(), 255, 0, 0, true ) else outputChatBox("#ff0000 Dinheiro insuficiente", source, 255, 0, 0, true) end end ) addEvent("ak",true) addEventHandler("ak",root,
  14. lol , you are using it clientSide , it should be serverside on meta.xml and my script will work fine .
  15. --- غير اسم الماب زي ماحدد لك في السكربت + تأكد انه client في meta.xml local vehicles = { [432] = true, [514] = true, } addEventHandler("onClientVehicleDamage", resourceRoot, function ( theAttacker, mapInfo ) info = mapInfo.modename if info == "Destruction derby" then --- Map Name if ( theAttacker and (getElementModel[vehicles])) and( getElementType ( localPlayer ) == "vehicle" ) then blowVehicle ( localPlayer ) end end end )
  16. addCommandHandler('spawn', function ( ) spawnPlayer ( source, nX, nY, nZ ) --- nX, nY, nZ Change it to your x, y, z position fadeCamera( source, true ) setCameraTarget ( source, source ) giveWeapon ( source, 31, 200 ) setPedArmor ( source, 100 ) outputChatBox( ' Spawned With M4 And Armor ' , source, 255, 255, 0 ) end )
  17. you want to move player to inside the store ? it's alredy in your script . .
  18. you mean like this ? local g_Serials = { ['814C2B1B38A029CAR917428BCDD701C3'] = true --- allowed serial } addEventHandler("onResourceStart", resouceRoot, function ( ) if not g_Serials [ getPlayerSerial ( source ) ] then --- if he's not allowed to then local Resource = getResourceFromName ( "race" ) --- get race resource if ( Resource and ( getResourceState(Resource) == "running" )) then --- if it was running then stopResource(Resource) --- stop it outputChatBox(' Resource Stopped - Security Not Passed ! ' , source, 255, 0 , 0 ) -- msg ------------------------------------------------------------ otherwise elseif g_Serials [ getPlayerSerial ( source ) ] then -- if its allowed then if ( Resource and ( getResourceState(Resource) == "stopping " )) then -- and the resource was stopped then startResource ( Resource ) -- start it outputChatBox(' Resource Started - Security !' , source, 255, 0 , 0 ) -- msg end end end end ) change race -- to your resource Name ,
  19. What, do you mean ?
  20. ممكن تصححه addCommandHandler('reset', function ( ) for _, v in ipairs ( getElementsByType('player')) do setPlayerMoney(v, 0 ) end end ) الارقمنت اللي داخل الفنكشن غير مطلوبة لانك معرفها في اللوب اصلا مثل player, amount, command . . . ومايحتاج تسوي وظيفة باسم سوي بدون اسم . . عشان ماتطول الكود
  21. السطر 33 قوس زائد + انا طرحت له الكود الصحيح . .
  22. تقصد كذا if guiGetVisible ( w ) == true then بس ما تفرق نفس الشيء تعطي القيمه true بدون شيء +1 مايحتاج . Returns Returns true if the element is visible, false otherwise.
  23. So , it's must be this line making the error addEventHandler ("onClientMarkerHit", marker1, markerHit) addEventHandler ("onClientMarkerHit", marker2, markerHit) addEventHandler ("onClientMarkerHit", marker3, markerHit) addEventHandler ("onClientMarkerHit", marker4, markerHit) addEventHandler ("onClientMarkerHit", marker5, markerHit) addEventHandler ("onClientMarkerHit", marker6, markerHit) addEventHandler ("onClientMarkerHit", marker7, markerHit) You Could , Make a tabel or somthing than making 6 events !
×
×
  • Create New...