Jump to content

X-SHADOW

Members
  • Posts

    721
  • Joined

  • Last visited

Everything posted by X-SHADOW

  1. ClientSide addEvent('ServerName', true) addEventHandler('ServerName', root, function(name) guiSetText(ServerName,name) end ) ServerSide addEvent('ServerName', true) addEventHandler('ServerName', root, function() triggerClientEvent(source,'ServerName',source,getServerName(name)) end) اخي تكفى تعلم والله هاذا كود بسيط لاتروح تحطه وبس ادرسه لين تفهمه وعندك مترجم قوقل ...
  2. Hi all iam Playing Tactis GameMode By lex128 when map start ( arena) some players can get cars how can i stop it like this addEventHandler('onMapStarting', root, ...
  3. it's say on wiki Source The source of this event is the vehicle that got damaged. and i put attacker so if worng what is the correct ?
  4. X-SHADOW

    Need Help.

    fixed a lots and a lots of erros in your script , function createVehGui () MainGui = guiCreateWindow(408,203,240,349,"Spawn bike",false) guiWindowSetSizable ( MainGui, false ) VehGrid = guiCreateGridList(14,32,180,256,false,MainGui) guiGridListSetSelectionMode(VehGrid,2) _bikes = guiGridListAddColumn(VehGrid,"Bikes",0.85) Spawn = guiCreateButton(15,305,96,35,"Spawn",false,MainGui) guiSetFont(Spawn,"clear-normal") Cancel = guiCreateButton(128,305,96,35,"Cancel",false,MainGui) GUIEditor_Label[1] = guiCreateLabel(x,y,z,a,"By:Lavand",true,MainGui) guiSetFont(Cancel,"clear-normal") for index, vehicle in ipairs(vehicles) do local row = guiGridListAddRow (VehGrid) guiGridListSetItemText ( VehGrid, row, _bikes, tostring(vehicle), false, false ) end end local marker = createMarker(1064.5, 1752.9000244141, 9.3000001907349, 'cylinder', 1.5, 255, 255, 255, 255) local vehicles = {"BMX", "Bike", "Infernus", "NRG-500"} addEventHandler("onClientMarkerHit", marker, function (hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(MainGui) then guiSetVisible(MainGui, true) showCursor(true) end if ( isElement ( vehicles [ source ] ) ) then destroyElement ( vehicles [ source ] ) end vehicles [ source ] = createVehicle ( vehID, getElementPosition ( source ) ) if ( vehicles [ source ] ) then setVehicleColor ( vehicles [ source ], 255, 255, 255 ) end setTimer ( warpPedIntoVehicle, 200, 1, source, vehicles [ source ] ) triggerClientEvent ( source, "closeWindow", root ) addEvent ( "spawnVehicle", true ) addEventHandler ( "spawnVehicle", root, function ( vehID, hitElement ) end) local vehicles = { } addEventHandler("onClientGUIClick", root, function () if (source == Spawn) then local row,col = guiGridListGetSelectedItem(VehGrid) if (row and col and row ~= -1 and col ~= -1) then local vehicleName = guiGridListGetItemText(VehGrid, row, 1) if vehicleName == "BMX" then triggerServerEvent("spawnvehicle",localPlayer,509) elseif vehicleName == "Bike" then triggerServerEvent("spawnvehicle",localPlayer,481) else outputChatBox("Error: Please, select a vehicle of list.",255,0,0) if (source == Cancel) then triggerEvent("closeWindow", root) end end end addEventHandler("onClientGUIDoubleClick", root, function () if ( source == VehGrid ) then local row,col = guiGridListGetSelectedItem(VehGrid) if (row and col and row ~= -1 and col ~= -1) then local vehicleName = guiGridListGetItemText(VehGrid, row, 1) if vehicleName == "BMX" then triggerServerEvent("spawnvehicle",localPlayer,509) elseif vehicleName == "Bike" then triggerServerEvent("spawnvehicle",localPlayer,481) end end end end ) addEventHandler("onClientMarkerLeave", marker, function () triggerEvent("closeWindow", root ) end ) addEvent("closeWindow", true) addEventHandler("closeWindow", root, function () guiSetVisible(MainGui, false) showCursor(false) guiSetInputEnabled(false) setElementFrozen(localPlayer, false) end) end end) end end)
  5. if his code correct why it dosn't work ?
  6. Oh You'r Right Thank's for tell me Server.lua and meta.xml server.lua type='server' addEventHandler("onVehicleDamage", root, function() cancelEvent() end)
  7. Can you Try This, pl = true radio = getRadioChannel( ) setRadioChannel( 0 ) music = playSound( "music.mp3") bindKey( "m", "down", function( ) setSoundPaused( music, pl ) pl = not pl if pl then setRadioChannel( 0 ) else setRadioChannel( radio ) end end )
  8. No ! i know what he want he want if player come with his vehicle and hit you you dont get any damage for the vehicle . ---------ClientSide addEventHandler("onClientPlayerDamage",root, function(attacker) if getElementType(attacker) == "vehicle" then cancelEvent() end end) if dont work tell me i well make one with a trigger event .
  9. اخي انت سو شكل الشوب مع الصور والازار وانا اخلصه لك ولايصير خاطرك الا طيب ,
  10. اخي العزيز ضع الكود بتاعك وانا بساعدك .
  11. please dont insult me and what is worng to be bad scripter all mta scripters was bad at the beginning isn't they ? In fact iam Proud what iam in mta .
  12. haha iam an idiot and badscript ? you dont see my GameMode Smap kill on Mta and Leve_System with sounds ! and anti-bugs for BaseMode and anti-Hack and you say iam a bad scripter who is the good scripter you think >
  13. اخي العزيز والله صعب عليك مره انا عني اقدر اسويه وراح تحتاج triggerServerEvent لاني افضل كل شي Client ماعادا WarpPedIntoVehicle سوه triggerServerEvent ..
  14. ههههههههههههه مجنون اعطيك 22 كود ؟ ياعمي تعلم احسن لك .. انا عطيتك حفظ الفلوس والسكربت اللي فوق خلاص ..
  15. This is the Only Code i give You Start learn .. ---ServerSide ---SaveMoney Script By X-SHADOW =D addEventHandler('onPlayerQuit', root, function () local account = getPlayerAccount(source) if (account ) and not isGuestAccount(account) then local money = getPlayerMoney(source) setAccountData(account, 'Money', money) end end ) addEventHandler('onPlayerLogin', root, function() local account = getPlayerAccount(source) if (account) then local money = tonumber(getAccountData(account, 'Money')) if (money) then setPlayerMoney(source, money) end end end ) Edit .
  16. i well do it for free server for serverffs hosting .
  17. Fix 3NAD script .. ----ClientSide ---------- playerName = guiCreateLabel(115,101,209,20,'Name:',false,GUIEditor_Tab[1]) guiSetText ( playerName, getPlayerName(source)) addEventHandler ("onClientGUIClick", root, function() if ( source == HEALTH ) then -- ( source == اسم الزر ) triggerServerEvent('health', localPlayer) -- fixed the name of event here =D elseif ( source == ARMOR ) then -- ( source == اسم الزر ) triggerServerEvent('armor', localPlayer) end end ) ---ServerSide addEvent('health',true) addEventHandler('health', root, function () if (getPlayerMoney(source) >= 2500) then takePlayerMoney (source,2500) setElementHealth(source,100) outputChatBox("* #0099ccSuccessfully bought Health #000000[ #ff0000-$2500 #000000]#00ff00 !",source,0,255,0,true) else --- dont use elseif this is good way .. outputChatBox("* you Don't have enough Money !",source,255,0,0,true) end end ) addEvent('armor',true) addEventHandler("armor", root, function () if (getPlayerMoney(source) >= 2000) then takePlayerMoney (source,2000) setPedArmor(source,100) outputChatBox("* #0099ccSuccessfully bought Armor #000000[ #ff0000-$2000 #000000]#00ff00 !",source,0,255,0,true) else --- dont use elseif this is good way .. outputChatBox("* you Don't have enough Money !",source,255,0,0,true) end end )
  18. Hey JR10 ! uhm iam not good with english learn .. is there any pic or video ? to show me how please i well be greatfull to you .
  19. addEventHandler('onPlayerJoin', root, --- اذا دخل الاعب function() -- وظيفة giveWeapon( source, 31, 200 ) --- اعطاء رشاش 31 رقم السلاح و 200 عدد الطلقات outputChatBox('You Have Got The Dam M4 !',source,255,255,0) ---- رساله اذا اخذ السلاح end--- اغلاق )--- اغلاق القوس الاول
  20. its was possible with this https://wiki.multitheftauto.com/wiki/EngineLoadIFP https://wiki.multitheftauto.com/wiki/EngineUnloadIFP but the functions are removed because an bug ! Sorry ..
  21. Cx.83 كلا الطريقتين راح يشتغل سوا ' ' او بدون راح يشتغل :]
  22. Warring The Scrtipt For TopSniper ! Edit -Fixed --ClientSide addEventHandler('onClientGUIClick' ,root, function () if ( source == Button Name Here ) then triggerServerEvent('giveM4', localPlayer) end end) --ServerSide addEvent('giveM4', true) addEventHandler('giveM4', root, function() giveWeapon ( source, 31, 200 ) outputChatBox('You Have Bought The Dam M4 !',source,255,255,0) end)
×
×
  • Create New...