-
Posts
34 -
Joined
-
Last visited
Everything posted by Notorious^
-
Hello all All is good but my serverside is bad.i cant make it.can you help me ? I entered marker and GUI is working but i cant warp to coordinates.please help.i mean i didnt triggered server event. Clientside : GUIEditor = { Button = {}, window = {}, label = {} } local screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow((screenW - 313) / 2, (screenH - 109) / 2, 313, 109, "konu basligi", false) guiWindowSetSizable(GUIEditor.window[1],false) GUIEditor.label[1] = guiCreateLabel (37, 28, 236, 16, (" soru sorma yeri ? "), false, GUIEditor.window.[1]) guiSetFont (GUIEditor.label[1], "default-bold-small") guiLabelHorizontalAlign(GUIEditor.label[1],"center", false) GUIEditor.button[1] = guiCreateButton (25, 66,129,32, "evet", false,GUIEditor.window[1]) guiSetPropert(GUIEditor.button[1], "normalTextColour","FFAAAAAA") GUIEditor.button[2] = guiCreateButton(154,66,129,32, "Hayir",false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "normalTextColour", "FFAAAAAA") guiSetVisible (GUIEditor.window[1],false) local enabled = true Mark = {1507.73,2842.96,10.82}, {-310.012,1583.59,75.56}, {-2125.71,272.62,35.48}, } for k, v in ipairs (Mark) do z = v[3] -1 Marker = createMarker (v[1], v[2], z, "cylinder", 2, 255,255,0,0) setElementData (Marker,"markerPurpose","Arena") addEventHandler ("onClientMarkerHit",Marker, function (hit) if hit == localPlayer then if not enabled then exports.topBarChatMessage ( "test",2000) return end if isPedInVehicle (localPlayer) then return end guiSetVisible ( GUIEditor.window[1],true) ShowCursor (true) guiSetText (GUIEditor.label[1],"Arenaya girmek istiyor musun ?")) playSound ("tus.wav") end end) end addEventHandler ("onClientGuiClick",root,function() if source == GUIEditor.button[1] then guiSetVisible (GUIEditor.window[1],false) showCursor (false) triggerServerEvent ("warphal",localPlayer) playSound ("kabul.mp3") else if source ==GUIEditor.button[2] then guiSetVisible (GUIEditor.window[1],false) showCursor (false) playSound ("hadi.mp3") end end) addEvent ("montana",true) addEventHandler ("montana",root,function() guiSetVisible (GUIEditor.window[1],true) guiSetText (GUIEditor.label[1],("girmek istermisin ?")) showCursor (true) end) Server side: addEvent("warphal", true) addEventHandler("warphal",root,spawn) local spawns = { {2014.47,1523.71,10.81}, {2023.47,1437.71,10.81}, {2121.47,1481.71,10.81}, {1928.47,1482.71,10.81} } function spawn (localPlayer) local rnd = math.random 1, #spawns) setElementPosition ( localPlayer, spawns [rnd][1],spawns [rnd][2],spawns [rnd][3]) end
-
Thanks man i am trying.
-
Hello friends can you give me an idea? Which function or event need for this ? I want put this lines on my zones.please help i just need functions.i am sharing image.thanks https://imgur.com/a/7ICvqql
-
Hi guys ı am using top bar messages but ı want add sound when script sending top bar messages.ı added some codes but it not worked.would you like to help me please ? thanks now. Clientside : local useTopbar = true local joinquit = true local namechanges = true local sx, sy = guiGetScreenSize ( ) local rsx, rsy = sx / 1280, sy / 1024 addEvent ( "onClientPlayerLogin", true ) addEventHandler ( "onClientPlayerLogin", root, function ( ) --useTopbar = tobool ( exports.NGPhone:getSetting ( "usersettings_usetopbar" ) ) --joinquit = tobool ( exports.NGPhone:getSetting ( "usersetting_notification_joinquitmessages" ) ) --namechanges = tobool ( exports.NGPhone:getSetting ( "usersetting_notification_nickchangemessages" ) ) if not useTopbar then useTopbar = false removeEventHandler ( "onClientRender", root, dxDrawNotificationBar ) end end ) addEvent ( "onClientUserSettingChange", true ) addEventHandler ( "onClientUserSettingChange", root, function ( g, v ) if ( g == "usersettings_usetopbar" ) then if not tobool ( v ) and useTopbar then useTopbar = false removeEventHandler ( "onClientRender", root, dxDrawNotificationBar ) elseif tobool ( v ) and not useTopbar then useTopbar = true addEventHandler ( "onClientRender", root, dxDrawNotificationBar ) end elseif ( g == "usersetting_notification_joinquitmessages" ) then joinquit = v elseif ( g == "usersetting_notification_nickchangemessages" ) then namechanges = v end end ) local maxMessages = 5; local DefaultTime = 8; local moveSpeed = 2; local sx, sy = guiGetScreenSize ( ) local DefaultPos = true; local messages_top = { } local toDo = { } local messageDelay = 500 local TheResourceName = getResourceName ( getThisResource ( ) ) local lastAutoMessage = 1 local t = 0 function sendClientMessage ( msg, r, g, b, img, checkImgPath ) if ( checkImgPath == nil ) then checkImgPath = true; end if ( img and sourceResource and checkImgPath ) then img = ":"..tostring(getResourceName(sourceResource)).."/"..img; end return _sendClientMessage ( msg, r, g, b, img ); end --tostring ( msg ), tonumber ( r ) or 255, tonumber ( g ) or 255, tonumber ( b ) or 255 function _sendClientMessage ( msg, r, g, b, img ) if ( useTopbar ) then --if ( not exports.NGLogin:isClientLoggedin ( ) ) then return end local msg, r, g, b = tostring ( msg ), tonumber ( r ) or 255, tonumber ( g ) or 255, tonumber ( b ) or 255 local img = img or ""; if ( img ~= "" and not fileExists ( img ) ) then img = "" end local data = { msg, r, g, b, getTickCount ( ) + DefaultTime*1000, -25, true, img } if ( getTickCount ( ) - t >= messageDelay ) then table.insert ( messages_top, data ) t = getTickCount ( ) else table.insert ( toDo, data ) end else outputChatBox ( msg, r, g, b ) sound = playSound ("notif.wav") end end addEvent ( TheResourceName..":sendClientMessage", true ) addEventHandler ( TheResourceName..":sendClientMessage", root, _sendClientMessage ) local width = (sx/1.95) local t2 = getTickCount ( ) --[[ .:Table Format:. [1] = message, [2] = red count, [3] = green count, [4] = blue count, [5] = Remove Time, [6] = Y Axis, [7] = Is Locked, [8] = Image icon path ]] function dxDrawNotificationBar ( ) if ( #toDo > 0 and getTickCount ( ) -t >= messageDelay ) then local d = toDo[1] d[5] = getTickCount ( ) + DefaultTime*1000 table.insert ( messages_top, d ) table.remove ( toDo, 1 ) t = getTickCount ( ) end local doRemove = { } for i, v in pairs ( messages_top ) do local i = i - 1 local msg, r, g, b, rTime, y = unpack ( v ) local continue = true if ( rTime < getTickCount ( ) and v[7] ) then messages_top[i+1][7] = false end if ( v[7] ) then if ( messages_top[i] ) then toY = messages_top[i][6] + 25 else toY = 0 end if ( y ~= toY ) then if ( y < toY ) then y = y + moveSpeed if ( y > toY ) then y = toY end else y = y - moveSpeed if ( y < toY ) then y = toY end end else if ( #messages_top > maxMessages ) then messages_top[1][5] = 0 messages_top[1][7] = false end end else y = y - moveSpeed if ( y < -25 ) then continue = false end end messages_top[i+1][6] = y local lColor = tocolor ( 0, 0, 0, 255 ) dxDrawRectangle ( (sx/2-width/2), rsy*y, width, rsy*25, tocolor ( 0, 0, 0, 100 ) ) dxDrawLine ( (sx/2-width/2), rsy*y, (sx/2-width/2)+width, rsy*y, lColor ) dxDrawLine ( (sx/2-width/2), rsy*y, (sx/2-width/2), rsy*(y+25), lColor ) dxDrawLine ( (sx/2+width/2), rsy*y, (sx/2+width/2), rsy*(y+25), lColor ) dxDrawLine ( (sx/2+width/2)-width, rsy*(y+25), (sx/2+width/2), rsy*(y+25), lColor ) if ( v[8] and v[8] ~= "" ) then dxDrawImage ( (sx/2-width/2)+3, (rsy*y)+2, rsx*21, rsy*21, v[8] ); dxDrawImage ( (sx/2-width/2)+(width-25), (rsy*y)+2, rsx*21, rsy*21, v[8] ); end dxDrawText ( v[1], 0, rsy*y, sx, rsy*(y+25), tocolor ( 200,200,200, 255 ), rsx*1, "sans", "center", "center", true, false, false, true ) --v[2], v[3], v[4], if ( not continue ) then table.insert ( doRemove, i+1 ) end end if ( #doRemove > 0 ) then for i, v in ipairs ( doRemove ) do if ( messages_top [ v ] ) then table.remove ( messages_top, v ) end end end end addEventHandler ( "onClientRender", root, dxDrawNotificationBar ) function tobool ( input ) local input = tostring ( input ):lower ( ) if ( input == "true" ) then return true elseif ( input == "false" ) then return false else return nil end end --[[ addCommandHandler ( 'rt', function ( ) for i=1,5 do sendClientMessage ( tostring ( i ), 255, 255, 0 ) end end ) ]] -- join/quit messages addEventHandler ( "onClientPlayerJoin", root, function ( ) if joinquit then sendClientMessage ( "* "..getPlayerName(source).." sunucuya giriş yaptı!", 255, 150, 150 ) end end ) addEventHandler ( "onClientPlayerQuit", root, function ( r ) if ( joinquit ) then sendClientMessage ( "* "..getPlayerName(source).." sunucudan çıkış yaptı. ("..r..")", 255, 150, 150 ) end end ) -- Nickname changes addEventHandler ( "onClientPlayerChangeNick", root, function ( o, n ) sendClientMessage ( "* "..o.." artık şu isimle tanınıyor : "..n, 255, 150, 150 ) end ) function message (messagesound) local sound = playSound("notif.wav") setSoundVolume(sound, 0.8) end addEventHandler("onClientRender", localPlayer, message)
-
hey ı am not newbie just ı cant give first join weapon to player. https://files.fm/u/h6juyehx my resource with meta you can check :C
-
ı tried 3 times not working mate.
-
<meta> <script src="server.lua"/> </meta> ?
-
all codes make senses.but not working.aaaaaaa! ı putting in server side.and meta is true!
-
ı checked again now.all is good man.why not working ı dont know :C
-
Hello all, I want give m4 to player when he first join.but my code not working.whats my mistake.can you help me ?
-
zombies spawning and destroying in anti zombie zone
Notorious^ replied to Notorious^'s topic in Scripting
setElementData ( zomb, "zombie", true ) this line already exist in resources -
zombies spawning and destroying in anti zombie zone
Notorious^ replied to Notorious^'s topic in Scripting
No its not giving error or warnings ı dont understand what is mistake :C -
zombies spawning and destroying in anti zombie zone
Notorious^ replied to Notorious^'s topic in Scripting
Thanks DeadthStrock but still same. zombies still spawning and 3 or 4 seconds later destroying.ı make anti zombie zone for nemesis area.but now nemesis attacking zombies and later entering bug :C -
hello This is my anti zombie zone codes.but problem zombies still spawning and 2 or 3 seconds later dying in zone.sometimes they dont die in this zone.so ı added destroyElement but still they spawning. whats my mistake ? Can you please help ?
-
How can ı use slothbot with 2 BOSS ? ı using 2 boss with 1 slothbot but its bugged.anyone help me ? ı just need idea.thanks now.
-
Hi all ı want add explosion to helmet zombie.his skin number 44.ı tried with createExplosion (x,y,z, 0) but its not worked.its more important for us please help.what can ı do ? thanks .. function zombiedamaged ( attacker, weapon, bodypart ) if getElementType ( source ) == "ped" then if (getElementData (source, "zombie") == true) then if ( bodypart == 9 ) then helmeted = "no" local zskin = getElementModel ( source ) for k, skin in pairs( helmetzombies ) do if skin == zskin then helmeted = "yes" end end if helmeted == "no" then triggerServerEvent ("headboom", source, source, attacker, weapon, bodypart ) end end end end end addEventHandler ( "onClientPedDamage", getRootElement(), zombiedamaged )
-
Mega9 thanks for help.ı changed 'poor' to 'pro' but still not working :C ı added serverside but ı dont understand why its not working
-
ı just want change rocket damage.very rocket must take 10 health.i have simple code but not working.what is my mistake ? thanks for help. function reduceP ( ) setWeaponProperty ( 35, "poor", "damage", 10 ) end addEventHandler ( "onResourceStart", resourceRoot, reduceP )
-
yes ! ı maked it thanks for helps but last question how can ı just disable rocket damage in las venturas ? do you know ? ı tried this but not working :C addEventHandler("onClientPlayerDamage", root, function(stopRocketDamage) -- if ( weapon == 19 ) then --if the weapon used was the rocket local x,y,z = getElementPosition(source) -- player position local zone = getZoneName(x,y,z, true) -- position name if zone == "Las Venturas" then -- if position nae las venturas cancelEvent() -- eventi iptal et end end end) okay all is done.problems solved thanks for all
-
Hi man.i was saw this page but i didint understand.rocket damage id 19.what can i do ? If you know could you say me ? Hello man . Bro i just want close damage for pvp.just players can kill zombies.some zombie servers using this.
-
Its simple code but its not work for rocket.when i put another weapon,weapon damage canceled.but just not working with rocket.help please :C function stopRocketDamage ( attacker, weapon, bodypart ) if ( weapon == 35 ) then --if the weapon used was the rocket cancelEvent addEventHandler "onClientPlayerDamage" getLocalPlayer
-
exports.Messages:sendClientMessage ( "Use 'B' button for On/Off Radio.", root, 255, 0, 0 ) local working = true local stream = playSound("http://radio.stereoscenic.com/asp-s") setSoundVolume (stream, 0.7) local x, y = guiGetScreenSize() local sX, sY = (x/1366), (y/768) local alpha = 175 local alpha2 = 255 local moveOn = true local font = dxCreateFont('font.ttf', y/80) function toggleRadio() working = not working if working == false then moveOn = false setSoundVolume(stream, 0) else moveOn = true setSoundVolume(stream, 0.7) end end bindKey("n","down",toggleRadio) Hello All, it doesnt work when ı change this radio channel with youtube URL.but really I need add youtube URL.what should ı do for it ? Are there any resource for youtube URL or any functiıon ? please help me. İngilizce---------------Dili algılaAfrikaancaAlmancaAmharcaArapçaArnavutçaAzericeBaskçaBatı FrizcesiBelarusçaBengalceBirman diliBoşnakçaBulgarcaCava DiliCebuanoÇekçeÇince (Basitleştirilmiş)Çince (Geleneksel)DancaEndonezceErmeniceEsperantoEstoncaFarsçaFelemenkçeFilipinceFinceFransızcaGalceGaliçyacaGüceratçaGüney Sotho diliGürcüceHaiti KreyoluHausa diliHawaii diliHırvatçaHintçeHmong Diliİbo diliİbraniceİngilizceİrlandacaİskoç GaelcesiİspanyolcaİsveççeİtalyancaİzlandacaJaponcaKannada diliKatalancaKazakçaKhmer diliKırgızcaKoreceKorsikacaKürtçeLao diliLatinceLehçeLetoncaLitvancaLüksemburgcaMacarcaMakedoncaMalayalam diliMalaycaMalgaşçaMaltacaMaori diliMarathi diliMoğolcaNepalceNorveççeNyanjaÖzbekçePencapçaPeştucaPortekizceRumenceRusçaSamoa diliShonaSırpçaSindhi diliSinhali diliSlovakçaSlovenceSomaliceSunda DiliSvahili diliTacikçeTamilceTaycaTelugu diliTürkçeUkraynacaUrducaVietnamcaYidişYorubacaYunancaZosa diliZulucaTürkçe
-
ı want set time for warp.when player write /garage command , he should warp 5 seconds later.but ı cant :C Anyone help me for this ? thanks.. local warpTime = 5000 -- 5 seconds addCommandHandler( "garage", function( thePlayer ) setElementPosition( thePlayer, -1995.29871, 434.22961, 35.17188 ) outputChatBox( "You are now in Garage", player, 0, 255, 0 ) local warpTimer = setTimer(function() setElementPosition(thePlayer) end, warpTime, 1)
-
scripting MTA:SA Script kodlama ile ilgili her destek verilir.
Notorious^ replied to Asokanta's topic in Turkish / Türkçe
O arkadasin kendine hayri yok bos muhabbet birisi cevap vermeyin