Jump to content

Max+

Members
  • Posts

    1,363
  • Joined

  • Last visited

Everything posted by Max+

  1. Nope it's say server:11 Bad argument spawnPlayer .. i tryed like this and same error , local respawn = { }; -- Spawn manager , local spawns = { { x = 238.6613311767, y = 141.05133056641, z = 1003.0234375 }; { x = 190.87297058105, y = 158.49531555176, z = 1003.0234375 }; { x = 298.23620605496, y = 172.01306152344, z = 1007.171875 }; } -- Spawn manager , function spawn ( uPed ) local x, y, z unpack(spawns[math.random(#spawns)]) setElementInterior(uPed, 3) setTimer ( spawnPlayer, 2000, 1, uPed, x, y, z ) setTimer ( fadeCamera, 3000, 1, uPed, true, 0.5 ) setTimer ( setCameraTarget, 3000, 1, uPed, uPed ) showCursor ( uPed, false ) end -- Spawn manager , addEventHandler ( 'onPlayerWasted', root, function ( ) fadeCamera ( source, false, 1.0, 0, 0, 0 ); setTimer ( fadeCamera, 3500, 1, source, true, 0.5 ); local x, y, z unpack(spawns[math.random(#spawns)]) setElementInterior(uPed, 3) setTimer ( spawnPlayer, 3000, 1, source, x, y, z ); end ) -- Spawn manager ,
  2. and i sayed how to defined uPed when he is alredy defined in the function !
  3. i swear they are correct but i get this error , setElementInterior Expected element at argument 1 got nill ,
  4. انا علمت كيف ! math.random عشوأئي يعني تبي تسوي فلوس عشوايئي مابات عشوايئي spawn عشوائي اي شي عشوائي ! math.floor لتشيل الاعدادا التقريبية . All_tables = { } --- معرفه هنا ~
  5. ---------Math.random addEventHandler('onMarkerHit', marker, function (hitElement) if (getElementType(hitElement) == 'player') then givePlayerMoney(player, math.random(3000, 5000)) --فلوس عشواءية ! end end ) ------------------------ -----Math.floor function scoreboardHealthUpdate() if source and getElementType(source) == "player" then local health = math.floor(getElementHealth(source)) --- ازالة العدد النسبي ! setElementData(source, "Health", health.."%") end end --------------- ----table.insert table1 = { '1','2','3','4' } table2 = { '5','6','7','8' } All_tables = {} table.insert(All_tables,table1)--- ادخال البيانات ! table.insert(All_tables,table2)---ادخال البيانات ! --------------- ----table.remove table1 = { '1','2','3','4' } table2 = { '5','6','7','8' } All_tables = {} table.remove(All_tables,table1)--- مسح البيانات ! table.remove(All_tables,table2)---مسح البيانات ! ---------------
  6. لا تعطني سمك بل علمني الصيد افهم يا صديقي طيب واذا جآ بكره وفتح موضوع شرح لهم ؟ اعطيه اياه من الاساس افضل ,,
  7. Good Job Man , Thank's for Releasing it , Keep it up ,
  8. load math.random string.format math.floor table.insert table.remove math.random --- شي عشوائي مثلا ابي يعطيني فلوس مابين 100 الى 200 ريال . 1 = math.random(100, 200) givePlayerMoney(source, 1) math.floor يجيب لك النسبة بالضبط يعني دمك 99 يقول لي 99,29 تستخدم math.floor عشان يشيل التقريبي . table.insert -- ادخال تيبل ~ table.remove -- ازالة تيبل .
  9. it's defined Here ! function spawn ( uPed ) and problem it's spawn me on the sky not in Interior 3 ! ~
  10. it's defined in the function ! and the functions ,!
  11. Sorry for the other Topic my internet stoped ,
  12. Hello Guys i got Problem with spawnManger i have but spawn point of Arena 20 it's Call on Admin Panel Police4 -- interior 3 but it's say setElementInterior Expected element at argument 1 got nill , and it's spawn in the sky -- Spawn manager , local spawns = { { x = 238.6613311767, y = 141.05133056641, z = 1003.0234375 }; { x = 190.87297058105, y = 158.49531555176, z = 1003.0234375 }; { x = 298.23620605496, y = 172.01306152344, z = 1007.171875 }; } -- Spawn manager , function spawn ( uPed ) local spawn = spawns [ math.random ( #spawns ) ] local x, y, z = spawn.x, spawn.y, spawn.z setElementInterior(uPed, 3, x, y, z) setElementDimension(uPed, 0) setTimer ( spawnPlayer, 2000, 1, uPed, x, y, z ) setTimer ( fadeCamera, 3000, 1, uPed, true, 0.5 ) setTimer ( setCameraTarget, 3000, 1, uPed, uPed ) showCursor ( uPed, false ) end -- Spawn manager , addEventHandler ( 'onPlayerWasted', root, function ( ) fadeCamera ( source, false, 1.0, 0, 0, 0 ); setTimer ( fadeCamera, 3500, 1, source, true, 0.5 ); local spawn = spawns [ math.random ( #spawns ) ] local x, y, z = spawn.x, spawn.y, spawn.z setElementInterior(uPed, 3, x, y, z) setElementDimension(uPed, 0) setTimer ( spawnPlayer, 3000, 1, source, x, y, z ); end )
  13. تبي تحل مشكلة الاند ؟ حمل برنامج MTA script edtor اول ماتحط السكربت بالبرنامج يطلع لك تحت قسم الاخطاء بالانجليزي يقول لك مثلا ناقص اند في السطر 4 او السطر 50
  14. so it well be like this ? function radio ( x ) local team = getPlayerTeam ( source ) if ( not team ) then return outputChatBox ( "You are not in a team!", source, 255, 0, 0 ) end local r, g, b = getTeamColor ( team ) local players = getPlayersInTeam ( team ) for k,v in ipairs(players) do if getTeamName(getPlayerTeam(source)) == "Team1" then elseif getTeamName(getPlayerTeam(source)) == "Team2" then end if ( x == 5) then outputChatBox (""..getPlayerName(source)..": Taking Fire! Need Assistance!", v, r, g, b) elseif ( x == 1 ) then outputChatBox (""..getPlayerName(source)..": Attack the Enemys Team !", v, r, g, b) elseif ( x == 2 ) then outputChatBox (""..getPlayerName(source)..": Defend our Team!", v, r, g, b) elseif ( x == 3 ) then outputChatBox (""..getPlayerName(source)..": Its ours", v, r, g, b) elseif ( x == 4 ) then outputChatBox (""..getPlayerName(source)..": I Cant Help !", v, r, g, b) elseif ( x == 6 ) then outputChatBox (""..getPlayerName(source)..": Requesting backup!!!", v, r, g, b) elseif ( x == 11 ) then outputChatBox (""..getPlayerName(source)..": Enemy spotted!!", v, r, g, b) elseif ( x == 12 ) then outputChatBox (""..getPlayerName(source)..": Enemy Vehicle spotted!!", v, r, g, b) elseif ( x == 13 ) then outputChatBox (""..getPlayerName(source)..": Enemy Airplane spotted!!", v, r, g, b) elseif ( x == 16 ) then outputChatBox (""..getPlayerName(source)..": Roger that!", v, r, g, b) elseif ( x == 17 ) then outputChatBox (""..getPlayerName(source)..": Negative!", v, r, g, b) elseif ( x == 18 ) then outputChatBox (""..getPlayerName(source)..": I got one!", v, r, g, b) end end end addEvent ("radio", true) addEventHandler ("radio", getRootElement(), radio)
  15. Solid You Know BaseMode and Tatcis Right? There is 2 Teams if i was in team 1 and send radio message i need it for my team only other team can't see my message and if i was team 2 do the same to team 1
  16. This well not make team 1 radio messaeg show to team 2 right ?
  17. Hi all i keep giting this error ! bad argument #1 to 'ipairs' ( table expected , got boolean) iam Making it for teams team 1 and team 2 it source == team 1 then radio for team 1 only else if source == team 2 then radio for team 2 only function radio ( x ) local r, g, b = getTeamColor(getPlayerTeam(source)) local team = getTeamFromName ( getTeamName(getPlayerTeam(source)) ) local players = getPlayersInTeam ( team ) for k,v in ipairs(players) do if getTeamName(getPlayerTeam(source)) == "Team1" then setElementVisibleTo (Team1, v, false) setTimer (setElementVisibleTo, 500, 1, Team1, v, true) setTimer (setElementVisibleTo, 1000, 1, Team1, v, false) setTimer (setElementVisibleTo, 1500, 1, Team1, v, true) setTimer (setElementVisibleTo, 2000, 1, Team1, v, false) setTimer (setElementVisibleTo, 2500, 1, Team1, v, true) elseif getTeamName(getPlayerTeam(source)) == "Team2" then setElementVisibleTo (Team2[source], v, false) setTimer (setElementVisibleTo, 500, 1, Team2[source], v, true) setTimer (setElementVisibleTo, 1000, 1, Team2[source], v, false) setTimer (setElementVisibleTo, 1500, 1, Team2[source], v, true) setTimer (setElementVisibleTo, 2000, 1, Team2[source], v, false) setTimer (setElementVisibleTo, 2500, 1, Team2[source], v, true) end if ( x == 5) then outputChatBox (""..getPlayerName(source)..": Taking Fire! Need Assistance!", v, r, g, b) elseif ( x == 1 ) then outputChatBox (""..getPlayerName(source)..": Attack the Enemys Team !", v, r, g, b) elseif ( x == 2 ) then outputChatBox (""..getPlayerName(source)..": Defend our Team!", v, r, g, b) elseif ( x == 3 ) then outputChatBox (""..getPlayerName(source)..": Its ours", v, r, g, b) elseif ( x == 4 ) then outputChatBox (""..getPlayerName(source)..": I Cant Help !", v, r, g, b) elseif ( x == 6 ) then outputChatBox (""..getPlayerName(source)..": Requesting backup!!!", v, r, g, b) elseif ( x == 11 ) then outputChatBox (""..getPlayerName(source)..": Enemy spotted!!", v, r, g, b) elseif ( x == 12 ) then outputChatBox (""..getPlayerName(source)..": Enemy Vehicle spotted!!", v, r, g, b) elseif ( x == 13 ) then outputChatBox (""..getPlayerName(source)..": Enemy Airplane spotted!!", v, r, g, b) elseif ( x == 16 ) then outputChatBox (""..getPlayerName(source)..": Roger that!", v, r, g, b) elseif ( x == 17 ) then outputChatBox (""..getPlayerName(source)..": Negative!", v, r, g, b) elseif ( x == 18 ) then outputChatBox (""..getPlayerName(source)..": I got one!", v, r, g, b) end end end addEvent ("radio", true) addEventHandler ("radio", getRootElement(), radio)
  18. You Have 2 Erros #1 thePlayer -- not defined #2 (mapName) in the command you put MapName ! -- Buy a next map function buyMap(mapName) local account = getPlayerAccount(source) local cash = getAccountData(account, "cash") local level = getAccountData(account, "level") if not (mapName == "") then if not (isGuestAccount(getPlayerAccount(source))) then if tonumber(level) >= 10 then if tonumber(cash) >= 3500 then executeCommandHandler ( "nextmap" , source, mapName ) else outputChatBox("#FFFFFF[userpanel] #FF9900You don't have enough money to set a map!",source,255,255,255,true) end else outputChatBox("#FFFFFF[userpanel] #FF9900You need to be level #FFFFFF10 #FF9900to buy maps!",source,255,255,255,true) end end else outputChatBox("#FFFFFF[userpanel] #FF9900Please select a map from the list first!",source,255,255,255,true) end end addEvent("triggerbuyMap",true) addEventHandler( "triggerbuyMap", getRootElement(),buyMap ) function onBuyMapReady() local account = getPlayerAccount(source) addStat(account,"cash",-3500) end addEvent("setCashofBuyMap",true) addEventHandler( "setCashofBuyMap", getRootElement(), onBuyMapReady ) --end MAP
  19. Good Job Csmit195 But if the Code Orgnized it well Be Better =
  20. Max+

    onPlayerWasted :D

    i need them images / ..
  21. Max+

    onPlayerWasted :D

    i'v go to wiki and see argument 5 is the path of image !
  22. Max+

    onPlayerWasted :D

    what you mean he say guicreateImage Expetcted string at argument 5
  23. Max+

    onPlayerWasted :D

    Bad argument @ 'guiCreateStaticImage'[Expetcted string at argument 5 , got nill]
  24. Max+

    onPlayerWasted :D

    Oh ! Dam i didn't look there lol iam going to try .
  25. Max+

    onPlayerWasted :D

    sound for both of them lol ? i need it for attacker only and images not shown Lua --Client ----The Images Script bodypartImage = { [3] = 'images/torso.png', [4] = 'images/ass.png', [5] = 'images/leftarm.png', [6] = 'images/rightarm.png', [7] = 'images/leftleg.png', [8] = 'images/rightleg.png', [9] = 'images/head.png', } addEventHandler('onClientPlayerWasted', getRootElement(), function(killer, weapon, bodypart) if ( attacker ) and ( attacker ~= source ) then screenX, screenY = guiGetScreenSize() width = 350 height = 348 guiCreateStaticImage((screenX/1184)-(width/635), (screenY/172)-(height/109), width, height, bodypartImage[bodypart], false) setTimer(destroyElement, 3000, 1, image) end end) ---Sound Script ding = 'sounds/hit.wav' addEventHandler('onClientPlayerDamage', root, function(attacker) if ( attacker ) and ( attacker ~= source ) then playSound(ding) end end ) ----Rights addEventHandler('onClientResourceStart', resourceRoot, function() triggerServerEvent('rights', localPlayer) end )
×
×
  • Create New...