-
Posts
153 -
Joined
-
Last visited
Everything posted by Lucario
-
Im not tigreblanco, i say im the subowner, i say i have 2 servers because im the tigreblancos cousin and i live near him, every weekend i go to visit him, he say me, "my server is your server"
-
And how you explain, i have 2 servers, yes my english is not exelent, but i have 2 servers, i have more than 2 testicles (No offend)
-
When a crim got jailed, make a timer with the time in the jail in the screen, when the time end, release the crim, this what i mean
-
Ok, im the subowner of 2 servers, juramento freeroam and zombie roleplay, i think i have all the experience i need. This offended me, i study english 5 years, i think i know it, if you dont know it, dont ask it
-
can i put the timer in the position of the screen i want?
-
Im started scripting in 2009, but the first year, i only know the basic how to translate and leorning event handlers, then i stopped scripting for 4 mouth, and then i have started in November 2012 with the difficult functions, the first mouth i have leorned isObjectInACLGroup and hasObjectPermissionTo and now im leorning dxDrawText and xml database, also studyed setTimer, killTimer, killPed, all Event handlers, removeHandler, create..., etc
-
Can i put the timer where i want using the missiontimer? I think it so basic, but still work.
-
Hi, Here i will give all the info of my experience of lua and contact form. If you need cheap and nice scripter or mapper, you can easyly contact me with this email: [email protected] Info: - Started playing mta on 2008 - 2009 - Started Scripting on 2011 - 19 Years old - Studing programation in a hight special school in madrid spain - Experienced in html and javascript The prices are razonable with the client. You can also send me a private message if you need my job
-
a ver en que idioma se lo digo, en ingles? im not tigreblanco, esque pareceis enfermos hablando todo el rato de mi primo, esque teneis problemas con mi familia o que? si la respuesta es si mejor callaros
-
si no os gusta el tutorial, entonces iros a cagar de aqui, no se por que todavia estais respondiendo al tema si ni siquiera os interesa, preferiria publicarlo en el global antes de que unos tontos vengan a joder el trabajo de mi primo
-
Neh... yo le di 'Dislike' adrede. Seras cabron, no respetas el trabajo de las personas, como quieres que te respeten a ti y a tu trabajo, si es que tienes e.e, no es insulto, cabron aqui decimos en broma, insulto es lo que haces tu para joder a la gente
-
Mentira que wn? tu frase no tiene nada de sentido como tu, esa cuenta es de tigre awn, y sus cuentas llevan 1 año
-
Hi, i really dont know how to put a dx timer in the jail of the police job by stolka when the timer end unjail the guy, im trying to script it more than 1 hour, but dont know what i must use, i use dxdrawtext, and then what? what functions i must use? code of the job by stolka modified but conserve his rights: afText = {} myTextItem = {} function warnText ( aWText, player ) if ( myTextItem[player] ) then textDestroyTextItem ( myTextItem[player]) end afText[player] = textCreateDisplay () textDisplayAddObserver( afText[player], player ) myTextItem[player] = textCreateTextItem ( aWText, 0.22, 0.8,0.5 , 0, 255, 0, 255, 3 ) textDisplayAddText ( afText[player], myTextItem[player] ) -- outputChatBox ( textA, player ) setTimer ( textDestroyTextItem, 5000, 1, myTextItem[player], player ) end createBlip ( 1552.4996337891, -1677.3264160156, 15.1953125, 30 ) createBlip ( -1604.5458984375, 712.25848388672, 12.8671875, 30 ) createBlip ( 2340.9245605469, 2456.0463867188, 13.96875, 30 ) function createSAPDTeam () SAPDteam = createTeam ("Policia", 100, 149, 237) end addEventHandler ("onResourceStart", resourceRoot, createSAPDTeam) function joinSAPD(id) setPlayerTeam(source,SAPDteam) setPlayerNametagColor ( source, 100, 149, 237 ) setElementModel(source, id) giveWeapon ( source, 3 ) playeraccount = getPlayerAccount( source ) setAccountData( playeraccount, "team", "Policia", true ) warnText("Ahora Eres un Policia.",source,0,255,0) end addEvent("getJob", true) addEventHandler("getJob",root,joinSAPD) function removeSAPD() setPlayerTeam(source, Civiles) takeWeapon(source, 3) playeraccount = getPlayerAccount(source) if not getAccountData(playeraccount, "standardskin") then setElementModel(source, 0) else setElementModel(source,getAccountData(playeraccount,"standardskin")) end warnText("Ahora Eres un Civil.",source,0,0,255) end addEvent("removeSAPD", true) addEventHandler("removeSAPD",root,removeSAPD) function policeJob ( attacker, attackerweapon, bodypart, loss ) if attacker and getElementType(attacker) == "player" then theTeam = getPlayerTeam ( attacker ) theWL = getPlayerWantedLevel ( source ) theSkin = getElementModel ( attacker ) if (attackerweapon == 3) and (loss > 2 ) and (theWL > 0) then if getTeamName( theTeam ) == "Policia" or getTeamName( theTeam ) == "SWAT" or getTeamName( theTeam ) == "FBI" or getTeamName( theTeam ) == "Ejercito" then setElementPosition (source, 3306.1, 1195.7, 945, true) toggleAllControlls (source, true) theName = getPlayerName ( source ) theCop = getPlayerName ( attacker ) warnText( "Has Sido Encarcelado Por "..theCop.. ".", source ) warnText( "Has Encarcelado a "..theName, attacker ) local playeraccount = getPlayerAccount ( attacker ) local oldArrest = getAccountData(playeraccount, "arrest") local newArrest if oldArrest then newArrest = setAccountData(playeraccount, "arrest", tonumber(oldArrest) + 1 ) else newArrest = setAccountData(playeraccount, "arrest", 1 ) end if theWL == 1 then setTimer ( setElementPosition, 20000, 1, source, 1544.4332275391, -1674.7698974609, 13.688399200439) toggleControl (fire, false) toggleControl (enter_exit, false) toggleControl (jump, false) toggleControl (next_weapon, false) givePlayerMoney (attacker, 3000 * theWL ) setPlayerWantedLevel (source, 0) elseif theWL == 2 then setTimer ( setElementPosition, 40000, 1, source, 1544.4332275391, -1674.7698974609, 13.688399200439) toggleControl (fire, false) toggleControl (enter_exit, false) toggleControl (jump, false) toggleControl (next_weapon, false) givePlayerMoney (attacker, 6000 * theWL ) setPlayerWantedLevel (source, 0) elseif theWL == 3 then setTimer ( setElementPosition, 60000, 1, source, 1544.4332275391, -1674.7698974609, 13.688399200439) toggleControl (fire, false) toggleControl (enter_exit, false) toggleControl (jump, false) toggleControl (next_weapon, false) givePlayerMoney (attacker, 9000 * theWL ) setPlayerWantedLevel (source, 0) elseif theWL == 4 then setTimer ( setElementPosition, 80000, 1, source, 1544.4332275391, -1674.7698974609, 13.688399200439) toggleControl (fire, false) toggleControl (enter_exit, false) toggleControl (jump, false) toggleControl (next_weapon, false) givePlayerMoney (attacker, 12000 * theWL ) setPlayerWantedLevel (source, 0) elseif theWL == 5 then setTimer ( setElementPosition, 100000, 1, source, 1544.4332275391, -1674.7698974609, 13.688399200439) toggleControl (fire, false) toggleControl (enter_exit, false) toggleControl (jump, false) toggleControl (next_weapon, false) givePlayerMoney (attacker, 15000 * theWL ) setPlayerWantedLevel (source, 0) elseif theWL == 6 then -- max level is 6........ setTimer ( setElementPosition, 120000, 1, source, 1544.4332275391, -1674.7698974609, 13.688399200439) toggleControl (fire, false) toggleControl (enter_exit, false) toggleControl (jump, false) toggleControl (next_weapon, false) givePlayerMoney (attacker, 18000 * theWL ) setPlayerWantedLevel (source, 0) end end end end end addEventHandler ("onPlayerDamage", getRootElement(), policeJob) function freezeWeapon (attacker, attackerweapon, bodypart, loss) theTeam = getPlayerTeam ( attacker ) theWL = getPlayerWantedLevel ( source ) if attacker and attacker ~= source and theTeam and getElementType(attacker) == "player" then if (attackerweapon == 23) and (loss > 1) and (theWL > 0) then if getTeamName( theTeam ) == "Policia" or getTeamName( theTeam ) == "SWAT" or getTeamName( theTeam ) == "FBI" or getTeamName( theTeam ) == "Ejercito" then local camera = fadeCamera ( source, true, 2.0, 191, 191, 191 ) local state = setControlState (source, "walk", true) local timer = setTimer ( freezeWeapon, 3000, 1) end end end end end addEventHandler ("onPlayerDamage", getRootElement(), freezeWeapon) function consoleCreateMarker ( source ) local playerAccount = getPlayerAccount(source) local arrest = getAccountData(playeraccount, "arrest") if not arrest then outputChatBox("No Tienes Ningun Arresto",source, 255, 0, 0) else outputChatBox("Numero de Arrestos "..arrest,source, 0, 255, 0) end end addCommandHandler ( "arrestos", consoleCreateMarker ) function stopJailTimer(Player) textDestroyDisplay(TimerDisplay) if TimerText then textDestroyTextItem(TimerText) end if isTimer(timerShitTimer) then killTimer(timerShitTimer) end end --\\\\\\\\\\\\\\\\\\\\\\\\\\ --// Setting local g_screenX, g_screenY = guiGetScreenSize(); local gScale = 0.3; local gAlphaDistance = 25; local gMaxDistance = 50; -- Max Distance local gTextAlpha = 120; local gTextSize = 1; local gAlphaDiff = gMaxDistance - gAlphaDistance; gScale = 1 / gScale * 800 / g_screenY; local gMaxScaleCurve = { { 0, 0 }, { 3, 3 }, { 13, 5 } }; local gTextScaleCurve = { { 0, 0.8 }, { 0.8, 1.2 }, { 99, 99 } }; local gTextAlphaCurve = { { 0, 0 }, { 25, 100 }, { 120, 190 }, { 255, 190 } }; local markerp = createMarker( 1552.4996337891, -1677.3264160156, 15.1953125, 'Cylinder', 1.5, 0, 0, 255, 150 ); local marker1p = createMarker( -1604.5458984375, 712.25848388672, 12.8671875, 'Cylinder', 1.5, 0, 0, 255, 150 ); local marker2p = createMarker( 2340.9245605469, 2456.0463867188, 13.96875, 'Cylinder', 1.5, 0, 0, 255, 150 ); addEventHandler ( 'onClientRender', root, function ( ) -- local x, y, z = getCameraMatrix(); local x1, y1, z1 = getElementPosition ( markerp ); local x2, y2, z2 = getElementPosition ( marker1p ); local x3, y3, z3 = getElementPosition ( marker2p ); local distance_1 = getDistanceBetweenPoints3D( x, y, z, x1, y1, z1 ); local distance_2 = getDistanceBetweenPoints3D( x, y, z, x2, y2, z2 ); local distance_3 = getDistanceBetweenPoints3D( x, y, z, x3, y3, z3 ); -- -- Marker #1 if distance_1 <= gMaxDistance then local x1_, y1_ = getScreenFromWorldPosition( x1, y1, z1 + 0.95, 0.06 ); if x1_ and y1_ then -- local scale = 1 / ( gScale * ( distance_1 / gMaxDistance ) ); local alpha = ( ( distance_1 - gAlphaDistance ) / gAlphaDiff ); alpha = ( alpha < 0 ) and gTextAlpha or gTextAlpha - ( alpha * gTextAlpha ); scale = math.evalCurve( gMaxScaleCurve, scale ); local textscale = math.evalCurve( gTextScaleCurve, scale ); local textalpha = math.evalCurve( gTextAlphaCurve, alpha ); -- dxDrawText( "Trabajo de Policia", x1_, y1_, x1_, y1_, tocolor ( 255, 255, 255, textalpha ), textscale * gTextSize, "arial", "center", "bottom", false, false, false, true ); end -- Marker #2 elseif distance_2 <= gMaxDistance then local x2_, y2_ = getScreenFromWorldPosition( x2, y2, z2 + 0.95, 0.06 ); if x2_ and y2_ then -- local scale = 1 / ( gScale * ( distance_2 / gMaxDistance ) ); local alpha = ( ( distance_2 - gAlphaDistance ) / gAlphaDiff ); alpha = ( alpha < 0 ) and gTextAlpha or gTextAlpha - ( alpha * gTextAlpha ); scale = math.evalCurve( gMaxScaleCurve, scale ); local textscale = math.evalCurve( gTextScaleCurve, scale ); local textalpha = math.evalCurve( gTextAlphaCurve, alpha ); -- dxDrawText( "Trabajo de Policia", x2_, y2_, x2_, y2_, tocolor ( 255, 255, 255, textalpha ), textscale * gTextSize, "arial", "center", "bottom", false, false, false, true ); end -- Marker #3 elseif distance_3 <= gMaxDistance then local x3_, y3_ = getScreenFromWorldPosition( x3, y3, z3 + 0.95, 0.06 ); if x3_ and y3_ then -- local scale = 1 / ( gScale * ( distance_3 / gMaxDistance ) ); local alpha = ( ( distance_3 - gAlphaDistance ) / gAlphaDiff ); alpha = ( alpha < 0 ) and gTextAlpha or gTextAlpha - ( alpha * gTextAlpha ); scale = math.evalCurve( gMaxScaleCurve, scale ); local textscale = math.evalCurve( gTextScaleCurve, scale ); local textalpha = math.evalCurve( gTextAlphaCurve, alpha ); -- dxDrawText( "police job", x3_, y3_, x3_, y3_, tocolor ( 255, 255, 255, textalpha ), textscale * gTextSize, "arial", "center", "bottom", false, false, false, true ); end end end ); -- ////////////////////////////////// -- // MATH FUNCTIONS // -- ////////////////////////////////// function math.evalCurve( curve, input ) if input < curve[ 1 ][ 1 ] then return curve[ 1 ][ 2 ]; end for idx = 2, #curve do if input < curve[ idx ][ 1 ] then local x1 = curve[ idx - 1 ][ 1 ]; local y1 = curve[ idx - 1 ][ 2 ]; local x2 = curve[ idx ][ 1 ]; local y2 = curve[ idx ][ 2 ]; local alpha = ( input - x1 ) / ( x2 - x1 ); return math.lerp( y1, y2, alpha ); end end return curve[ #curve ][ 2 ]; end function math.lerp( from, to, alpha ) return from + ( to-from ) * alpha; end Wnd = guiCreateWindow ( 0.2, 0.2, 0.50, 0.60, "Trabajo de Policia Version Beta 2.0", true ) guiSetAlpha( Wnd, 1 ) button = guiCreateButton ( 0.5, 0.8, 0.45, 0.15, "Cerrar", true, Wnd ) button1 = guiCreateButton ( 0.01, 0.8, 0.45, 0.15, "Escoger Trabajo", true, Wnd ) label = guiCreateLabel ( 0.05, 0.1, 0.9, 0.2, "Puedes Arrestar Criminales Dandoles Con la Porra\nSi No la Tienes Se te Dara Una.", true, Wnd ) showCursor(false) guiSetVisible( Wnd, false ) guiWindowSetSizable( Wnd, false ) guiWindowSetMovable( Wnd, false ) skins = { {"Officer 1", 280}, {"Officer 2", 281}, {"Ranger 1", 283}, {"Ranger 2", 288}, {"Traffic officer", 284}, } skinG = guiCreateGridList(0.01, 0.3, 0.99, 0.5, true, Wnd) guiGridListAddColumn(skinG, "Skins", 0.85) for i,skins in ipairs(skins) do row = guiGridListAddRow(skinG) -- guiGridListSetItemText(skinG, row, 1, tostring(skins[1]), false, false) guiGridListSetItemData(skinG, row, 1, tostring(skins[2])) end function SAPDjob(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(Wnd) then guiSetVisible(Wnd, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", markerp, SAPDjob) addEventHandler("onClientMarkerHit", marker1p, SAPDjob) addEventHandler("onClientMarkerHit", marker2p, SAPDjob) function takeJob() local row, col = guiGridListGetSelectedItem(skinG) if (row and col and row ~= -1 and col ~= -1) then local models = tonumber(guiGridListGetItemData(skinG, row, 1)) if model ~= "" then triggerServerEvent("getJob", localPlayer, models) guiSetVisible(Wnd,false) showCursor(false) end end end addEventHandler("onClientGUIClick", button1, takeJob, false) function close() if (source == button) then guiSetVisible(Wnd,false) showCursor(false) end end addEventHandler("onClientGUIClick", button, close)
-
local lp = getLocalPlayer() GUIEditor = { label = {}, button = {}, window = {}, gridlist = {}, memo = {} } shopwindows = guiCreateWindow(352, 156, 510, 519, "Tienda de autos por MultiKiller", false) guiWindowSetMovable(shopwindows, false) guiWindowSetSizable(shopwindows, false) guiSetVisible ( shopwindows, false ) shopgrid = guiCreateGridList(9, 21, 288, 390, false, shopwindows) carcolumn = guiGridListAddColumn(shopgrid, "Autos", 0.4) carprice = guiGridListAddColumn(shopgrid, "Precios", 0.4) row = guiGridListAddRow (shopgrid) guiGridListSetItemText(shopgrid, row, carcolumn, "Virgo", false, false) guiGridListSetItemText(shopgrid, row, carprice, "20000$", false, false) guiGridListSetItemText(shopgrid, row, carcolumn, "Uranus", false, false) guiGridListSetItemText(shopgrid, row, carprice, "27000$", false, false) guiGridListSetItemText(shopgrid, row, carcolumn, "Turismo", false, false) guiGridListSetItemText(shopgrid, row, carprice, "25000$", false, false) guiGridListSetItemText(shopgrid, row, carcolumn, "Super GT", false, false) guiGridListSetItemText(shopgrid, row, carprice, "30000$", false, false) guiGridListSetItemText(shopgrid, row, carcolumn, "Sultan", false, false) guiGridListSetItemText(shopgrid, row, carprice, "40000$", false, false) guiGridListSetItemText(shopgrid, row, carcolumn, "Euros", false, false) guiGridListSetItemText(shopgrid, row, carprice, "30000$", false, false) guiGridListSetItemText(shopgrid, row, carcolumn, "Romero", false, false) guiGridListSetItemText(shopgrid, row, carprice, "30000$", false, false) guiGridListSetItemText(shopgrid, row, carcolumn, "Regina", false, false) guiGridListSetItemText(shopgrid, row, carprice, "28000$", false, false) guiGridListSetItemText(shopgrid, row, carcolumn, "Rancher", false, false) guiGridListSetItemText(shopgrid, row, carprice, "20000$", false, false) guiGridListSetItemText(shopgrid, row, carcolumn, "Primo", false, false) guiGridListSetItemText(shopgrid, row, carprice, "23500$", false, false) guiGridListSetItemText(shopgrid, row, carcolumn, "Mr.Whooper", false, false) guiGridListSetItemText(shopgrid, row, carprice, "25000$", false, false) guiGridListSetItemText(shopgrid, row, carcolumn, "Kart", false, false) guiGridListSetItemText(shopgrid, row, carprice, "18000$", false, false) guiGridListSetItemText(shopgrid, row, carcolumn, "Jester", false, false) guiGridListSetItemText(shopgrid, row, carprice, "24000$", false, false) guiGridListSetItemText(shopgrid, row, carcolumn, "Infernus", false, false) guiGridListSetItemText(shopgrid, row, carprice, "40000$", false, false) guiGridListSetItemText(shopgrid, row, carcolumn, "Hotdog", false, false) guiGridListSetItemText(shopgrid, row, carprice, "23000$", false, false) guiGridListSetItemText(shopgrid, row, carcolumn, "Harvester", false, false) guiGridListSetItemText(shopgrid, row, carprice, "29000$", false, false) guiGridListSetItemText(shopgrid, row, carcolumn, "Emperor", false, false) guiGridListSetItemText(shopgrid, row, carprice, "24000$", false, false) guiGridListSetItemText(shopgrid, row, carcolumn, "Elegy", false, false) guiGridListSetItemText(shopgrid, row, carprice, "25000$", false, false) guiGridListSetItemText(shopgrid, row, carcolumn, "Elegant", false, false) guiGridListSetItemText(shopgrid, row, carprice, "26000$", false, false) guiGridListSetItemText(shopgrid, row, carcolumn, "Comet", false, false) guiGridListSetItemText(shopgrid, row, carprice, "29000$", false, false) guiGridListSetItemText(shopgrid, row, carcolumn, "Cheetah", false, false) guiGridListSetItemText(shopgrid, row, carprice, "35000$", false, false) guiGridListSetItemText(shopgrid, row, carcolumn, "Caddy", false, false) guiGridListSetItemText(shopgrid, row, carprice, "19000$", false, false) guiGridListSetItemText(shopgrid, row, carcolumn, "Bullet", false, false) guiGridListSetItemText(shopgrid, row, carprice, "42000$", false, false) guiGridListSetItemText(shopgrid, row, carcolumn, "Buffalo", false, false) guiGridListSetItemText(shopgrid, row, carprice, "37000$", false, false) guiGridListSetItemText(shopgrid, row, carcolumn, "Bravura", false, false) guiGridListSetItemText(shopgrid, row, carprice, "27500$", false, false) guiGridListSetItemText(shopgrid, row, carcolumn, "Blade", false, false) guiGridListSetItemText(shopgrid, row, carprice, "28500$", false, false) guiGridListSetItemText(shopgrid, row, carcolumn, "Banshee", false, false) guiGridListSetItemText(shopgrid, row, carprice, "45000$", false, false) guiGridListSetItemText(shopgrid, row, carcolumn, "Bandito", false, false) guiGridListSetItemText(shopgrid, row, carprice, "30000$", false, false) guiGridListSetItemText(shopgrid, row, carcolumn, "Admiral", false, false) guiGridListSetItemText(shopgrid, row, carprice, "23000$", false, false) GUIEditor.memo[1] = guiCreateMemo(0, 390, 40, 47, "", false, shopgrid) GUIEditor.memo[2] = guiCreateMemo(10, 505, 20, 0, "", false, shopwindows) GUIEditor.memo[3] = guiCreateMemo(10, 417, 277, 88, "Sistema de tienda de autos profesional, \nelige el auto comprarlo y apreta F2\npuedes comprar mas de 2 autos\npuedes cerrarlo, teleportarlo al punto de reparo, etc", false, shopwindows) guiMemoSetReadOnly(GUIEditor.memo[3], true) buy = guiCreateButton(326, 28, 153, 90, "Comprar", false, shopwindows) guiSetFont(buy, "sa-header") GUIEditor.label[1] = guiCreateLabel(313, 444, 187, 51, "Por MultiKiller con Ayuda de \nTigreBlanco\nSaludos de Juramento Server", false, shopwindows) guiSetFont(GUIEditor.label[1], "clear-normal") guiLabelSetColor(GUIEditor.label[1], 17, 255, 0) function watchGUI () if (getLocalPlayer() == source) then guiSetVisible (shopwindows, true) showCursor (true) end end addEvent ("watchGUI", true) addEventHandler ("watchGUI", getRootElement(), watchGUI) function onClientClick (button, state, absoluteX, absoluteYe) if (source == buy) then guiSetVisible (shopwindows, false) showCursor (false) if (guiGridListGetSelectedItem (shopwindows)) then local vehicleName = guiGridListGetItemText (shopgrid, guiGridListGetSelectedItem (shopgrid), 1) local vehicleID = getVehicleModelFromName (vehicleName) local vehicleCost = guiGridListGetItemText (shopgrid, guiGridListGetSelectedItem (shopgrid), 2) triggerServerEvent ("carShopBuy", getLocalPlayer(), vehicleID, vehicleCost, vehicleName) end end end addEventHandler ("onClientGUIClick", getRootElement(), onClientClick) carwindows = guiCreateWindow(398, 193, 463, 396, "Panel de Carro Por MultiKiller", false) guiWindowSetSizable(carwindows, false) guiSetVisible ( carwindows, false ) cargridlist = guiCreateGridList(10, 28, 139, 358, false, carwindows) carcolumn = guiGridListAddColumn(cargridlist, "Autos", 0.9) carrow = guiGridListAddRow(cargridlist) teletransport = guiCreateButton(166, 28, 130, 97, "Teletransportar", false, carwindows) guiSetFont(teletransport, "default-bold-small") guiSetProperty(teletransport, "NormalTextColour", "C8FFFFFF") sell = guiCreateButton(310, 28, 129, 97, "Vender", false, carwindows) guiSetFont(sell, "default-bold-small") guiSetProperty(sell, "NormalTextColour", "C8FFFFFF") lock = guiCreateButton(168, 265, 130, 110, "Cerrar", false, carwindows) guiSetFont(lock, "default-bold-small") guiSetProperty(lock, "NormalTextColour", "C8FFFFFF") lights = guiCreateButton(310, 265, 129, 110, "Luces ON/OFF", false, carwindows) guiSetFont(lights, "default-bold-small") guiSetProperty(lights, "NormalTextColour", "C8FFFFFF") watch = guiCreateButton(168, 140, 128, 105, "Observar", false, carwindows) guiSetFont(watch, "default-bold-small") guiSetProperty(watch, "NormalTextColour", "C8FFFFFF") mark = guiCreateButton(310, 139, 129, 106, "Marcar", false, carwindows) guiSetFont(watch, "default-bold-small") guiSetProperty(watch, "NormalTextColour", "C8FFFFFF") function resourceStart () bindKey ("F2", "down", carPanel) end addEventHandler ("onClientResourceStart", getResourceRootElement ( getThisResource () ), resourceStart) function carPanel () panel = guiGetVisible (carwindows) if (panel == true) then guiSetVisible (carwindows, false) showCursor (false) end if (panel == false) then guiSetVisible (carwindows, true) showCursor (true) end end addEvent ("carTeletransport", true) addEvent ("carSell", true) function guiClick (button, state, absoluteX, absoluteY) if (source == teletransport) then triggerServerEvent ("carTeletransport", lp) elseif (source == sell) then triggerServerEvent ("carSell", lp) elseif (source == watch) then triggerServerEvent ("lookCar", lp) elseif (source == lock) then triggerServerEvent ("lockCar", lp) elseif (source == lights) then triggerServerEvent ("lightsCar", lp) end end addEventHandler ("onClientGUIClick", getRootElement(), guiClick) addEventHandler( "onClientGUIClick", getRootElement(), function(vehiclename) if (source == mark) then local v = getElementModel (vehiclename) vehicleBlips[v] = createBlipAttachedTo( v, 27, 1 ) end end ) addEventHandler( "onClientGuiClick", getRootElement(), function(vehiclename) if (source == mark) then local vb = getElementModel (vehiclename) destroyElement( vb[source] ) vb[source] = nil end end ) function vehicleGridlist() if ( eventName == "onClientPlayerJoin" ) then guiGridListSetItemText ( cargridlist, guiGridListAddRow ( cargridlist ), carcolumn, getElementModel ( source ), false, false ) elseif ( eventName == "onClientPlayerQuit" ) then for carrow = 0, guiGridListGetRowCount ( cargridlist ) do if ( guiGridListGetItemText ( cargridlist, carrow, carcolumn ) == getElementModel ( source ) ) then guiGridListRemoveRow ( cargridlist, carrow ) end end elseif ( eventName == "onClientGuiClick" ) then triggerServerEvent ("carSell", source) for carrow = 0, guiGridListGetRowCount ( cargridlist ) do if ( guiGridListGetItemText ( cargridlist, carrow, carcolumn ) == getElementModel ( source ) ) then guiGridListRemoveRow ( cargridlist, carrow ) end end addEventHandler ( "onClientPlayerJoin", root, vehicleGridList ) addEventHandler ( "onClientPlayerQuit", root, vehicleGridList ) end end Now only can buy the admiral
-
Igualmente se lo digo a tigre descubre tu canal y te lo llena a dislikes, no te lo tomes como una amenaza, solo es un aviso, conozco bien a mi primo y eso es lo que mas le saca de quicio Muchas gracias de parte de tigre, ya le envie el mensaje que publicastes, y dice: Dale gracias de parte mia a esa gran persona
-
Sorry e.e the gridlist shows, but the prices and the cars doesnt shows
-
-
Client side: local lp = getLocalPlayer() GUIEditor = { label = {}, button = {}, window = {}, gridlist = {}, memo = {} } shopwindows = guiCreateWindow(352, 156, 510, 519, "Tienda de autos por MultiKiller", false) guiWindowSetMovable(shopwindows, false) guiWindowSetSizable(shopwindows, false) guiSetVisible ( shopwindows, false ) shopgrid = guiCreateGridList(9, 21, 288, 390, false, shopwindows) carcolumn = guiGridListAddColumn(shopgrid, "Autos", 0.4) pricecolumn = guiGridListAddColumn(shopgrid, "Precios", 0.4) guiGridListSetItemText(carcolumn, 0, 1, "Virgo", false, false) guiGridListSetItemText(pricecolumn, 0, 2, "20000$", false, false) guiGridListSetItemText(carcolumn, 1, 1, "Uranus", false, false) guiGridListSetItemText(pricecolumn, 1, 2, "27000$", false, false) guiGridListSetItemText(carcolumn, 2, 1, "Turismo", false, false) guiGridListSetItemText(pricecolumn, 2, 2, "25000$", false, false) guiGridListSetItemText(carcolumn, 3, 1, "Super GT", false, false) guiGridListSetItemText(pricecolumn, 3, 2, "30000$", false, false) guiGridListSetItemText(carcolumn, 4, 1, "Sultan", false, false) guiGridListSetItemText(pricecolumn, 4, 2, "40000$", false, false) guiGridListSetItemText(carcolumn, 5, 1, "Euros", false, false) guiGridListSetItemText(pricecolumn, 5, 2, "30000$", false, false) guiGridListSetItemText(carcolumn, 6, 1, "Romero", false, false) guiGridListSetItemText(pricecolumn, 6, 2, "30000$", false, false) guiGridListSetItemText(carcolumn, 7, 1, "Regina", false, false) guiGridListSetItemText(pricecolumn, 7, 2, "28000$", false, false) guiGridListSetItemText(carcolumn, 8, 1, "Rancher", false, false) guiGridListSetItemText(pricecolumn, 8, 2, "20000$", false, false) guiGridListSetItemText(carcolumn, 9, 1, "Primo", false, false) guiGridListSetItemText(pricecolumn, 9, 2, "23500$", false, false) guiGridListSetItemText(carcolumn, 10, 1, "Mr.Whooper", false, false) guiGridListSetItemText(pricecolumn, 10, 2, "25000$", false, false) guiGridListSetItemText(carcolumn, 11, 1, "Kart", false, false) guiGridListSetItemText(pricecolumn, 11, 2, "18000$", false, false) guiGridListSetItemText(carcolumn, 12, 1, "Jester", false, false) guiGridListSetItemText(pricecolumn, 12, 2, "24000$", false, false) guiGridListSetItemText(carcolumn, 13, 1, "Infernus", false, false) guiGridListSetItemText(pricecolumn, 13, 2, "40000$", false, false) guiGridListSetItemText(carcolumn, 14, 1, "Hotdog", false, false) guiGridListSetItemText(pricecolumn, 14, 2, "23000$", false, false) guiGridListSetItemText(carcolumn, 15, 1, "Harvester", false, false) guiGridListSetItemText(pricecolumn, 15, 2, "29000$", false, false) guiGridListSetItemText(carcolumn, 16, 1, "Emperor", false, false) guiGridListSetItemText(pricecolumn, 16, 2, "24000$", false, false) guiGridListSetItemText(carcolumn, 17, 1, "Elegy", false, false) guiGridListSetItemText(pricecolumn, 17, 2, "25000$", false, false) guiGridListSetItemText(carcolumn, 18, 1, "Elegant", false, false) guiGridListSetItemText(pricecolumn, 18, 2, "26000$", false, false) guiGridListSetItemText(carcolumn, 19, 1, "Comet", false, false) guiGridListSetItemText(pricecolumn, 19, 2, "29000$", false, false) guiGridListSetItemText(carcolumn, 20, 1, "Cheetah", false, false) guiGridListSetItemText(pricecolumn, 20, 2, "35000$", false, false) guiGridListSetItemText(carcolumn, 21, 1, "Caddy", false, false) guiGridListSetItemText(pricecolumn, 21, 2, "19000$", false, false) guiGridListSetItemText(carcolumn, 22, 1, "Bullet", false, false) guiGridListSetItemText(pricecolumn, 22, 2, "42000$", false, false) guiGridListSetItemText(carcolumn, 23, 1, "Buffalo", false, false) guiGridListSetItemText(pricecolumn, 23, 2, "37000$", false, false) guiGridListSetItemText(carcolumn, 24, 1, "Bravura", false, false) guiGridListSetItemText(pricecolumn, 24, 2, "27500$", false, false) guiGridListSetItemText(carcolumn, 25, 1, "Blade", false, false) guiGridListSetItemText(pricecolumn, 25, 2, "28500$", false, false) guiGridListSetItemText(carcolumn, 26, 1, "Banshee", false, false) guiGridListSetItemText(pricecolumn, 26, 2, "45000$", false, false) guiGridListSetItemText(carcolumn, 27, 1, "Bandito", false, false) guiGridListSetItemText(pricecolumn, 27, 2, "30000$", false, false) guiGridListSetItemText(carcolumn, 28, 1, "Admiral", false, false) guiGridListSetItemText(pricecolumn, 28, 2, "23000$", false, false) GUIEditor.memo[1] = guiCreateMemo(0, 390, 40, 47, "", false, shopgrid) GUIEditor.memo[2] = guiCreateMemo(10, 505, 20, 0, "", false, shopwindows) GUIEditor.memo[3] = guiCreateMemo(10, 417, 277, 88, "Sistema de tienda de autos profesional, \nelige el auto comprarlo y apreta F2\npuedes comprar mas de 2 autos\npuedes cerrarlo, teleportarlo al punto de reparo, etc", false, shopwindows) guiMemoSetReadOnly(GUIEditor.memo[3], true) buy = guiCreateButton(326, 28, 153, 90, "Comprar", false, shopwindows) guiSetFont(buy, "sa-header") GUIEditor.label[1] = guiCreateLabel(313, 444, 187, 51, "Por MultiKiller con Ayuda de \nTigreBlanco\nSaludos de Juramento Server", false, shopwindows) guiSetFont(GUIEditor.label[1], "clear-normal") guiLabelSetColor(GUIEditor.label[1], 17, 255, 0) addEvent ("watchGUI", true) function watchGUI () if (getLocalPlayer() == source) then guiSetVisible (shopwindows, true) showCursor (true) end end addEventHandler ("watchGUI", getRootElement(), watchGUI) function onClientClick (button, state, absoluteX, absoluteYe) if (source == buy) then guiSetVisible (shopwindows, false) showCursor (false) if (guiGridListGetSelectedItem (shopwindows)) then local vehicleName = guiGridListGetItemText (shopgrid, guiGridListGetSelectedItem (shopgrid), 1) local vehicleID = getVehicleModelFromName (vehicleName) local vehicleCost = guiGridListGetItemText (shopgrid, guiGridListGetSelectedItem (shopgrid), 2) triggerServerEvent ("carShopBuy", getLocalPlayer(), vehicleID, vehicleCost, vehicleName) end end end addEventHandler ("onClientGUIClick", getRootElement(), onClientClick) carwindows = guiCreateWindow(398, 193, 463, 396, "Panel de Carro Por MultiKiller", false) guiWindowSetSizable(carwindows, false) guiSetVisible ( carwindows, false ) cargridlist = guiCreateGridList(10, 28, 139, 358, false, carwindows) carcolumn = guiGridListAddColumn(cargridlist, "Autos", 0.9) carrow = guiGridListAddRow(cargridlist) teletransport = guiCreateButton(166, 28, 130, 97, "Teletransportar", false, carwindows) guiSetFont(teletransport, "default-bold-small") guiSetProperty(teletransport, "NormalTextColour", "C8FFFFFF") sell = guiCreateButton(310, 28, 129, 97, "Vender", false, carwindows) guiSetFont(sell, "default-bold-small") guiSetProperty(sell, "NormalTextColour", "C8FFFFFF") lock = guiCreateButton(168, 265, 130, 110, "Cerrar", false, carwindows) guiSetFont(lock, "default-bold-small") guiSetProperty(lock, "NormalTextColour", "C8FFFFFF") lights = guiCreateButton(310, 265, 129, 110, "Luces ON/OFF", false, carwindows) guiSetFont(lights, "default-bold-small") guiSetProperty(lights, "NormalTextColour", "C8FFFFFF") watch = guiCreateButton(168, 140, 128, 105, "Observar", false, carwindows) guiSetFont(watch, "default-bold-small") guiSetProperty(watch, "NormalTextColour", "C8FFFFFF") mark = guiCreateButton(310, 139, 129, 106, "Marcar", false, carwindows) guiSetFont(watch, "default-bold-small") guiSetProperty(watch, "NormalTextColour", "C8FFFFFF") function resourceStart () bindKey ("F2", "down", carPanel) end addEventHandler ("onClientResourceStart", getResourceRootElement ( getThisResource () ), resourceStart) function carPanel () panel = guiGetVisible (carwindows) if (panel == true) then guiSetVisible (carwindows, false) showCursor (false) end if (panel == false) then guiSetVisible (carwindows, true) showCursor (true) end end addEvent ("carTeletransport", true) addEvent ("carSell", true) function guiClick (button, state, absoluteX, absoluteY) if (source == teletransport) then triggerServerEvent ("carTeletransport", lp) elseif (source == sell) then triggerServerEvent ("carSell", lp) elseif (source == watch) then triggerServerEvent ("lookCar", lp) elseif (source == lock) then triggerServerEvent ("lockCar", lp) elseif (source == lights) then triggerServerEvent ("lightsCar", lp) end end addEventHandler ("onClientGUIClick", getRootElement(), guiClick) addEventHandler( "onClientGUIClick", getRootElement(), function(vehiclename) if (source == mark) then local v = getElementModel (vehiclename) vehicleBlips[v] = createBlipAttachedTo( v, 27, 1 ) end end ) addEventHandler( "onClientGuiClick", getRootElement(), function(vehiclename) if (source == mark) then local vb = getElementModel (vehiclename) destroyElement( vb[source] ) vb[source] = nil end end ) function vehicleGridlist() if ( eventName == "onClientPlayerJoin" ) then guiGridListSetItemText ( cargridlist, guiGridListAddRow ( cargridlist ), carcolumn, getElementModel ( source ), false, false ) elseif ( eventName == "onClientPlayerQuit" ) then for carrow = 0, guiGridListGetRowCount ( cargridlist ) do if ( guiGridListGetItemText ( cargridlist, carrow, carcolumn ) == getElementModel ( source ) ) then guiGridListRemoveRow ( cargridlist, carrow ) end end elseif ( eventName == "onClientGuiClick" ) then triggerServerEvent ("carSell", source) for carrow = 0, guiGridListGetRowCount ( cargridlist ) do if ( guiGridListGetItemText ( cargridlist, carrow, carcolumn ) == getElementModel ( source ) ) then guiGridListRemoveRow ( cargridlist, carrow ) end end addEventHandler ( "onClientPlayerJoin", root, vehicleGridList ) addEventHandler ( "onClientPlayerQuit", root, vehicleGridList ) end end Server side: carShopMarker = createMarker (2133.59,-1149.29, 23.3, "cylinder", 3, 255, 255, 0, 127) carShopMarker2 = createMarker (562, -1270, 16, "cylinder", 2, 255, 255, 0, 127) carShopMarker3 = createMarker (-1954,299,34,"cylinder",2,255,255,0,127) carShopMarker4 = createMarker (-1663,1208,6,"cylinder",2,255,255,0,127) carShopMarker5 = createMarker (1946,2068,10,"cylinder",2,255,255,0,127) createBlipAttachedTo(carShopMarker,55,2,0,255,0,0,0,200) createBlipAttachedTo(carShopMarker2,55,2,0,255,0,0,0,200) createBlipAttachedTo(carShopMarker3,55,2,0,255,0,0,0,200) createBlipAttachedTo(carShopMarker4,55,2,0,255,0,0,0,200) createBlipAttachedTo(carShopMarker5,55,2,0,255,0,0,0,200) addEvent ("watchGUI", true) function markerHit (hitPlayer, matchingDimension) if (source == carShopMarker) or (source == carShopMarker2) or (source == carShopMarker3) or (source == carShopMarker4) or (source == carShopMarker5) then triggerClientEvent ("watchGUI", hitPlayer) end end addEventHandler ("onMarkerHit", getRootElement(), markerHit) addEvent ("carShopBuy", true) addEventHandler ("carShopBuy", getRootElement(), function(id, cost, name) if (getPlayerMoney (source) >= tonumber(cost)) then outputChatBox ("Has comprado un " .. name, source, 0, 255, 0, false) outputChatBox ("Precio: " .. cost, source, 0, 255, 0, false) takePlayerMoney (source, tonumber (cost)) setAccountData (getPlayerAccount (source), "funmodev2-car", tonumber(id)) setAccountData (getPlayerAccount (source), "funmodev2-paintjob", 3) setAccountData (getPlayerAccount (source), "funmodev2-carupg", 0) else outputChatBox ("No tienes suficiente dinero para comprar un" .. name, source, 255, 0, 0, false) end end) addEvent ("carTeletransport", true) addEvent ("carSell", true) function carSpawn () if not (isGuestAccount (getPlayerAccount (source))) and not (isPedInVehicle(source)) then if (getElementData (source, "hisCar")) and (getElementData (source, "hisCar") ~= nil) and (getElementType(getElementData (source, "hisCar")) == "vehicle") then setElementVelocity (getElementData (source, "hisCar"), 0,0,0) setElementPosition (getElementData (source, "hisCar"), 1631.3790283203,-1094.9102783203,23.90625) outputChatBox ("El vehiculo ha sido teletransportado con exito.", source, 0, 255, 0) elseif not (getElementData (source, "hisCar")) then local accountData = getAccountData (getPlayerAccount (source), "funmodev2-car") if (accountData) then vehicleID = getAccountData (getPlayerAccount (source), "funmodev2-car") x,y,z = getElementPosition (source) vehicle = createVehicle (carID, x +2, y, z +1) setElementID (vehicle, getAccountName (getPlayerAccount(source))) setElementData (source, "hisCar", vehicle) outputChatBox ("El vehiculo ha sido teletransportado con exito.", source, 255, 0, 0) if (getAccountData (getPlayerAccount(source), "funmodev2-carupg")) then local upgrades = nil local upgrades = {} local upgrades = getAccountData (getPlayerAccount(source), "funmodev2-carupg") for i,v in ipairs (upgrades) do addVehicleUpgrade (vehicle, v) end end if (getAccountData (getPlayerAccount(source), "funmodev2-paintjob")) then local paintjob = getAccountData (getPlayerAccount(source), "funmodev2-paintjob") setVehiclePaintjob (vehicle, paintjob) end if (getAccountData (getPlayerAccount(source), "funmodev2-carcolor1")) and (getAccountData (getPlayerAccount(source), "funmodev2-carcolor2")) then local c1 = getAccountData (getPlayerAccount(source), "funmodev2-carcolor1") local c2 = getAccountData (getPlayerAccount(source), "funmodev2-carcolor2") setVehicleColor (vehicle, c1,c2,0,0) end else outputChatBox ("No tienes ningun vehiculo.", source, 255, 0, 0) end else outputChatBox ("Ya estas en un vehiculo!", source, 255, 0, 0) end end end addEventHandler ("carSpawn", getRootElement(), carSpawn) function carDestroy (cost) if not (isGuestAccount (getPlayerAccount (source))) then if (isPedInVehicle (source)) then if (getElementID(getPedOccupiedVehicle(source)) == getAccountName (getPlayerAccount(source))) then local sell = getPlayerAccount (source), "hisCar", tonumber(cost) givePlayerMoney (sell (source, "hisCar")) destroyElement (getPedOccupiedVehicle (source)) removeElementData (source, "hisCar") outputChatBox ("Vehiculo vendido, te han sido devueltos " ..cost, source, 0, 255, 0) else outputChatBox ("Este no es tu vehiculo!", source, 255, 0, 0) end elseif (not (isPedInVehicle (source))) and (getElementData (source, "hisCar")) and (getElementData (source, "hisCar") ~= nil) then car=getElementData(source, "hisCar") cancelEvent() outputchatbox ("Este carro es gratis y no se puede vender", source, 255, 0, 0) end end end addEventHandler ("carSell", getRootElement(), carDestroy) function lightsSwitch () if (isPedInVehicle (source)) then local veh = getPedOccupiedVehicle (source) if (getVehicleOverrideLights(veh) ~= 2) then setVehicleOverrideLights(veh, 2) outputChatBox ("Las luces del vehiculo han sido encendidas.", source, 0, 0, 255) elseif (getVehicleOverrideLights(veh) ~= 1) then setVehicleOverrideLights(veh, 1) outputChatBox ("Las luces del vehiculo han sido apagadas.", source, 0, 0, 255) end else outputChatBox ("No estas en un vehiculo!", source, 255, 0, 0) end end addEvent("lightsCar",true) addEventHandler("lightsCar",getRootElement(),lightsSwitch) function lockSwitch () if (isPedInVehicle (source)) then local veh = getPedOccupiedVehicle (source) if not (isVehicleLocked (veh)) then setVehicleLocked (veh, true) setVehicleDoorsUndamageable (veh, true) setVehicleDoorState (veh, 0, 0) setVehicleDoorState (veh, 1, 0) setVehicleDoorState (veh, 2, 0) setVehicleDoorState (veh, 3, 0) outputChatBox ("El vehiculo ha sido cerrado.", source, 255, 0, 0) elseif (isVehicleLocked (veh)) then setVehicleLocked (veh, false) setVehicleDoorsUndamageable (veh, false) outputChatBox ("El vehiculo ha sido abierto.", source, 0, 255, 0) end else outputChatBox ("No estas en un vehiculo!", source, 255, 0, 0) end end addEvent("lockCar",true) addEventHandler("lockCar",getRootElement(),lockSwitch ) addEventHandler ("onVehicleStartEnter", getRootElement(), function(player, seat, jacked, door) if (isVehicleLocked (source) == true) then local mannetjeNaam = getAccountName (getPlayerAccount (player)) local autoNaam = getElementID (source) if (mannetjeNaam == autoNaam) then setVehicleLocked (source, false) outputChatBox ("El vehiculo ha sido abierto!", player, 255, 0, 0, false) end end end) addEventHandler ("onVehicleExplode", getRootElement(), function() local theOwner = getAccountName (getPlayerAccount(getPlayerFromName (getElementID (source)))) if (theOwner) then removeElementData (theOwner, "hisCar") end end) addEventHandler ("onPlayerQuit", getRootElement(), function(quitType, reason, responsibleElement) if (getElementData (source, "hisCar")) then blowVehicle (getElementData (source, "hisCar")) removeElementData (source, "hisCar") end end) addEventHandler( "onResourceStop", getResourceRootElement( getThisResource() ), function () for i,v in ipairs (getElementsByType ("player")) do if (getElementData (v, "hisCar")) then setElementHealth (getElementData (v, "hisCar"), 0) removeElementData (v, "hisCar") end end end ) function destroyOnExplode () setTimer (destroyElement, 2500, 1, source) end addEventHandler ("onVehicleExplode", getRootElement(), destroyOnExplode) I have changed and added pricecolumn and carcolumn, but the shop doesn't have the gridlist
-
Thanks, but now when i hit the marker, the grid list of the cars doesn't appear
-
Ya pero hay demasiados novatos por mta, para ti es demasiado facil, para mi es facil, para tigre es facil, pero hay gente que ni se save como moverlo jaja
-
Hasta donde llego tigre con mis clases de scripting, le enseño de todo, antes el no sabia usar el gui editor, ahora hasta hizo un video O_O , es un video de 20 minutos, yo ya le di like Link: https://www.youtube.com/watch?v=FXiZxFCJ760 Es su canal secundario, en el primario creo que sube gameplays y otros tutoriales, saludos
-
thanks castillo but when i entry to the marker on the car shop, to the yellow marker, nothing happens
-
function closePanel () guiSetVisible(shopwindows,false) showCursor(false) end addEvent("closePanel",true) addEventHandler("closePanel",getRootElement(),closePanel) addEventHandler("onClientGUIClick",closePanel,false) Something like that?
-
http://www.lua.org o https://wiki.multitheftauto.com/ Me ayudo mucho cuando era principiante
-
Where is this opcions? i have quited onresourcestart, but i tested, it isnt it, can you specifice the part of the code plz?