Jump to content

Arsilex

Members
  • Posts

    1,410
  • Joined

  • Last visited

Everything posted by Arsilex

  1. Pos armándolo tío tu ad lo que puedes y posteas lo que as echo aquí nadie te va a decir como hacerlo..
  2. Arsilex

    handling

    digo esto https://wiki.multitheftauto.com/wiki/Han ... axVelocity
  3. Arsilex

    handling

    Como se usan las función de handling???
  4. Prueba esto function onSetTeamColorToCar(thePlayer) if isPedInVehicle (thePlayer) then local hisTeam = getPlayerTeam(thePlayer) if (hisTeam) then local r,g,b = getTeamColor(hisTeam) local hisVehicle = getPedOccupiedVehicle(thePlayer) setVehicleColor(hisVehicle,tonumber(r),tonumber(g),tonumber(b)) else -- if player not have team then local r,g,b = math.random(255),math.random(255),math.random(255) local hisVehicle = getPedOccupiedVehicle(thePlayer) setVehicleColor(hisVehicle,r,g,b) end end end function onWaitingForLaggers() --Delay it a bit to allow players to warp in their vehicle setTimer(onSetTeamColorToCar,2000,1,source) end addEventHandler("onNotifyPlayerReady",getRootElement(),onWaitingForLaggers) addEventHandler("onPlayerPickUpRacePickup",getRootElement(),onSetTeamColorToCar) addEventHandler("onPlayerReachCheckpoint",getRootElement(),onSetTeamColorToCar)
  5. Arsilex

    One Problem

    Eso cuando pongo next pero cuando inicio el panel osea /start panel pone lo siguiente WARNING: panel\stats-panel_s.lua:742: fileOpen; unable to load file
  6. Arsilex

    One Problem

    nono no es mio es de un amigo que se lo pasaron y me pidió arreglarlo pero no se que le pasa
  7. Arsilex

    One Problem

    function buyMap(thePlayer,mapName) if mapIsAlreadySet == false then if not (mapName == "") then local playerCash = tonumber(loadPlayerData(thePlayer,"cash")) if playerCash >= mapCost then executeCommandHandler("setmap",thePlayer,mapName) savePlayerData(thePlayer,"cash",playerCash-mapCost) outputChatBox("#FFFFFFNextmap: "..getPlayerName(thePlayer).."#FFFFFF has bought a next map!",getRootElement(),255,255,255,true) outputChatBox("#FFFFFFNextmap: #00AAFF"..mapName,getRootElement(),255,255,255,true) mapIsAlreadySet = thePlayer local oldmapbuys = loadPlayerData(thePlayer,"mapBuys") savePlayerData(thePlayer,"mapBuys", oldmapbuys + 1) CheckAchievement(thePlayer,13) scoreboardRefresh(thePlayer) else outputChatBox("#00AAFF# #FFFFFFYou don't have enough money to set a map!",thePlayer,255,255,255,true) end else outputChatBox("#00AAFF# #FFFFFFPlease select a map from the list first!",thePlayer,255,255,255,true) end else outputChatBox("#00AAFF# #FFFFFFA map is already set at the moment! Please try again later.",thePlayer,255,255,255,true) end end function unbuyMap(thePlayer) if mapIsAlreadySet ~= false then if mapIsAlreadySet == thePlayer then executeCommandHandler("setmap",thePlayer,nil) local playerCash = tonumber(loadPlayerData(thePlayer,"cash")) savePlayerData(thePlayer,"cash",playerCash+(mapCost/4)*3) outputChatBox("#FFFFFFNextmap: "..getPlayerName(thePlayer).."#FFFFFF has unbought a next map!",getRootElement(),255,255,255,true) mapIsAlreadySet = false local oldmapbuys = loadPlayerData(thePlayer,"mapBuys") savePlayerData(thePlayer,"mapBuys", oldmapbuys - 1) CheckAchievement(thePlayer,13) scoreboardRefresh(thePlayer) else outputChatBox("#00AAFF# #FFFFFFYou didn't buy that map!",thePlayer,255,255,255,true) end else outputChatBox("#00AAFF# #FFFFFFNo map has been bought!",thePlayer,255,255,255,true) end end function resetMapSetStatus() mapIsAlreadySet = false end addEventHandler("onMapStarting",getRootElement(),resetMapSetStatus) function getServerMaps (loadList,s) local tableOut if loadList then tableOut = {} -- local deletedMaps = {} local gamemodes = {} gamemodes = call(getResourceFromName("mapmanager"), "getGamemodes") for id,gamemode in ipairs (gamemodes) do tableOut[id] = {} tableOut[id].name = getResourceInfo(gamemode, "name") or getResourceName(gamemode) tableOut[id].resname = getResourceName(gamemode) tableOut[id].maps = {} local maps = call(getResourceFromName("mapmanager"), "getMapsCompatibleWithGamemode" , gamemode) for _,map in ipairs (maps) do table.insert(tableOut[id]["maps"] ,{name = getResourceInfo(map, "name") or getResourceName(map), resname = getResourceName(map)}) end table.sort(tableOut[id]["maps"], sortCompareFunction) end table.sort((tableOut), sortCompareFunction) table.insert(tableOut, {name = "no gamemode", resname = "no gamemode", maps = {}}) local countGmodes = #tableOut local maps = call(getResourceFromName("mapmanager"), "getMapsCompatibleWithGamemode") for id,map in ipairs (maps) do -- if fileOpen(":"..getResourceName(map).."/deleted") then -- table.insert(deletedMaps ,{name = getResourceInfo(map, "name") or getResourceName(map), resname = getResourceName(map)}) -- else table.insert(tableOut[countGmodes]["maps"] ,{name = getResourceInfo(map, "name") or getResourceName(map), resname = getResourceName(map)}) -- end end -- table.sort(deletedMaps, sortCompareFunction) table.sort(tableOut[countGmodes]["maps"], sortCompareFunction) -- table.insert(tableOut, {name = "deleted maps", resname = "deleted maps", maps = {}}) -- local countGmodes = countGmodes + 1 -- tableOut[countGmodes]["maps"] = deletedMaps end local map = call(getResourceFromName("mapmanager"), "getRunningGamemodeMap") local gamemode = call(getResourceFromName("mapmanager"), "getRunningGamemode") gamemode = gamemode and getResourceName(gamemode) or "N/A" map = map and getResourceName(map) or "N/A" callClientFunction(loadList,"loadMaps", tableOut, gamemode, map, s) end function sortCompareFunction(s1, s2) if type(s1) == "table" and type(s2) == "table" then s1, s2 = s1.name, s2.name end s1, s2 = s1:lower(), s2:lower() if s1 == s2 then return false end local byte1, byte2 = string.byte(s1:sub(1,1)), string.byte(s2:sub(1,1)) if not byte1 then return true elseif not byte2 then return false elseif byte1 < byte2 then return true elseif byte1 == byte2 then return sortCompareFunction(s1:sub(2), s2:sub(2)) else return false end end que falla de alli al comprar el mapa no lo setea
  8. Arsilex

    PayDay

    nada no sale nada
  9. Arsilex

    Guimecanico

    si aora si muchas gracias castillo
  10. Arsilex

    Guimecanico

    Client-side function AsdfAbsd () Panel = guiCreateWindow(749,180,617,462,"Gui de mecanico",false) guiSetAlpha(Panel,0.69999998807907) guiWindowSetMovable(Panel,true) guiWindowSetSizable(Panel,false) Repair = guiCreateButton(12,29,84,39,"Reparar",false,Panel) addEventHandler ( "onClientGUIClick", Repair, RepararVehiculo, false ) guiSetAlpha(Repair,0.69999998807907) guiSetFont(Repair,"default-bold-small") Chapa1 = guiCreateButton(115,29,84,39,"Chapa1",false,Panel) addEventHandler ( "onClientGUIClick", Chapa1, Cambiarpintura1, false ) guiSetAlpha(Chapa1,0.69999998807907) guiSetFont(Chapa1,"default-bold-small") Chapa2 = guiCreateButton(216,30,84,39,"Chapa2",false,Panel) addEventHandler ( "onClientGUIClick", Chapa2, Cambiarpintura2, false ) guiSetAlpha(Chapa2,0.69999998807907) guiSetFont(Chapa2,"default-bold-small") Chapa3 = guiCreateButton(322,30,84,39,"Chapa3",false,Panel) addEventHandler ( "onClientGUIClick", Chapa3, Cambiarpintura3, false ) guiSetAlpha(Chapa3,0.69999998807907) guiSetFont(Chapa3,"default-bold-small") Cerrar = guiCreateButton(140,407,84,42,"Cerrar",false,Panel) addEventHandler ( "onClientGUIClick", Cerrar, Exit, false ) guiSetFont(Cerrar,"default-bold-small") Info = guiCreateMemo(436,24,172,428,"Informacion de precios\n\nReparar = 100$\nChapas = 250$\nNitrox10 = 750$",false,Panel) guiSetAlpha(Info,0.69999998807907) Sopiler = guiCreateButton(12,88,84,39,"Nitrox10",false,Panel) guiSetAlpha(Sopiler,0.69999998807907) guiSetFont(Sopiler,"default-bold-small") addEventHandler ( "onClientGUIClick", Sopiler, Sopiler1, false ) Saltoar = guiCreateButton(114,88,84,39,"Hydraulics",false,Panel) guiSetFont(Saltoar,"default-bold-small") guiSetAlpha(Saltoar,0.69999998807907) addEventHandler ( "onClientGUIClick", Saltoar, Salto, false ) Rued = guiCreateButton(216,88,84,39,"Ruedas",false,Panel) guiSetFont(Rued,"default-bold-small") guiSetAlpha(Rued,0.69999998807907) addEventHandler ( "onClientGUIClick", Rued, RuedasPanel, false ) Pita = guiCreateButton(322,88,84,39,"Tunning",false,Panel) guiSetFont(Pita,"default-bold-small") guiSetAlpha(Pita,0.69999998807907) addEventHandler ( "onClientGUIClick", Pita, Tunninga, false ) end function guiToggleVisible ( ) if ( guiGetVisible ( Panel ) == true ) then -- check if the gui element is visible guiSetVisible ( Panel, false ) -- if it is, we hide it else guiSetVisible ( Panel, true ) -- if not, we make it visible end end addEvent( "onAbrirmierda", true ) addEventHandler( "onAbrirmierda", getRootElement(), guiToggleVisible) function RepararVehiculo () triggerServerEvent("onFix", getLocalPlayer()) end function Cambiarpintura1 () triggerServerEvent("onPintura", getLocalPlayer()) end function Cambiarpintura2 () triggerServerEvent("onPintura2", getLocalPlayer()) end function Cambiarpintura3 () triggerServerEvent("onPintura3", getLocalPlayer()) end function Exit () guiSetVisible (Panel, not guiGetVisible ( Panel ) ) end function Sopiler1 () player = localPlayer local price_nitro10x = 0 money = getPlayerMoney (source) if (money >= price_nitro10x) and getPedOccupiedVehicle(player) then outputChatBox ("Instalo un nitro x10 en el coche", 255, 255, 255, true) takePlayerMoney(price_nitro10x) addVehicleUpgrade( getPedOccupiedVehicle(player), 1010 ) end end function Salto () player = localPlayer local price_hydraulics = 0 money = getPlayerMoney (source) if (money >= price_hydraulics) and getPedOccupiedVehicle(player) then takePlayerMoney(price_hydraulics) addVehicleUpgrade( getPedOccupiedVehicle(player), 1087 ) elseif not getPedOccupiedVehicle(player) then outputChatBox("You should be in a vehicle.", 255, 0, 0) end end function RuedasPanel() PanelRuedas = guiCreateWindow(290,201,357,410,"Ruedas",false) Rueda1 = guiCreateButton(13,30,67,36,"1",false,PanelRuedas) addEventHandler ( "onClientGUIClick", Rueda1, Ruedaa1, false ) Rueda2 = guiCreateButton(100,30,67,36,"2",false,PanelRuedas) addEventHandler ( "onClientGUIClick", Rueda2, Ruedaa2, false ) Rueda3 = guiCreateButton(183,30,67,36,"3",false,PanelRuedas) addEventHandler ( "onClientGUIClick", Rueda3, Ruedaa3, false ) Rueda5 = guiCreateButton(15,82,67,36,"5",false,PanelRuedas) addEventHandler ( "onClientGUIClick", Rueda5, Ruedaa5, false ) Rueda8 = guiCreateButton(271,83,67,36,"8",false,PanelRuedas) addEventHandler ( "onClientGUIClick", Rueda8, Ruedaa8, false ) Rueda7 = guiCreateButton(184,82,67,36,"7",false,PanelRuedas) addEventHandler ( "onClientGUIClick", Rueda7, Ruedaa7, false ) Rueda6 = guiCreateButton(100,82,67,36,"6",false,PanelRuedas) addEventHandler ( "onClientGUIClick", Rueda6, Ruedaa6, false ) Rueda4 = guiCreateButton(271,29,67,36,"4",false,PanelRuedas) addEventHandler ( "onClientGUIClick", Rueda4, Ruedaa4, false ) Rueda12 = guiCreateButton(271,129,67,36,"12",false,PanelRuedas) addEventHandler ( "onClientGUIClick", Rueda12, Ruedaa12, false ) Rueda11 = guiCreateButton(183,128,67,36,"11",false,PanelRuedas) addEventHandler ( "onClientGUIClick", Rueda11, Ruedaa11, false ) Rueda10 = guiCreateButton(99,129,67,36,"10",false,PanelRuedas) addEventHandler ( "onClientGUIClick", Rueda10, Ruedaa10, false ) Rueda9 = guiCreateButton(13,130,67,36,"9",false,PanelRuedas) addEventHandler ( "onClientGUIClick", Rueda9, Ruedaa9, false ) Rueda13 = guiCreateButton(132,193,67,36,"13",false,PanelRuedas) addEventHandler ( "onClientGUIClick", Rueda13, Ruedaa13, false ) Salirr = guiCreateButton(58,314,223,53,"X",false,PanelRuedas) addEventHandler ( "onClientGUIClick", Salirr, Salir, false ) end function Ruedaa1() triggerServerEvent("onRuedaa1", getLocalPlayer()) end function Ruedaa2() triggerServerEvent("onRuedaa2", getLocalPlayer()) end function Ruedaa3() triggerServerEvent("onRuedaa3", getLocalPlayer()) end function Ruedaa5() triggerServerEvent("onRuedaa5", getLocalPlayer()) end function Ruedaa8() triggerServerEvent("onRuedaa8", getLocalPlayer()) end function Ruedaa7() triggerServerEvent("onRuedaa7", getLocalPlayer()) end function Ruedaa6() triggerServerEvent("onRuedaa6", getLocalPlayer()) end function Ruedaa4() triggerServerEvent("onRuedaa4", getLocalPlayer()) end function Ruedaa12() triggerServerEvent("onRuedaa12", getLocalPlayer()) end function Ruedaa11() triggerServerEvent("onRuedaa11", getLocalPlayer()) end function Ruedaa10() triggerServerEvent("onRuedaa10", getLocalPlayer()) end function Ruedaa9() triggerServerEvent("onRuedaa9", getLocalPlayer()) end function Ruedaa13() triggerServerEvent("onRuedaa13", getLocalPlayer()) end function Salir() guiSetVisible (PanelRuedas, not guiGetVisible ( PanelRuedas ) ) end function Tunninga () Tunning = guiCreateWindow(579,243,414,443,"Tunning",false) Spoliers = guiCreateLabel(60,28,274,23,"Spoilers",false,Tunning) guiLabelSetColor(Spoliers,255,0,0) guiLabelSetVerticalAlign(Spoliers,"center") guiLabelSetHorizontalAlign(Spoliers,"center",false) guiSetFont(Spoliers,"default-bold-small") S1 = guiCreateButton(33,53,57,26,"1",false,Tunning) addEventHandler ( "onClientGUIClick", S1, SP1, false ) S2 = guiCreateButton(297,52,57,26,"3",false,Tunning) addEventHandler ( "onClientGUIClick", S2, SP2, false ) S3 = guiCreateButton(169,53,57,26,"2",false,Tunning) addEventHandler ( "onClientGUIClick", S3, SP3, false ) Respiradores = guiCreateLabel(25,93,344,24,"Respiraderos",false,Tunning) guiLabelSetColor(Respiradores,255,0,0) guiLabelSetVerticalAlign(Respiradores,"center") guiLabelSetHorizontalAlign(Respiradores,"center",false) guiSetFont(Respiradores,"default-bold-small") R1 = guiCreateButton(34,129,57,26,"1",false,Tunning) R2 = guiCreateButton(125,128,57,26,"2",false,Tunning) R3 = guiCreateButton(312,128,57,26,"4",false,Tunning) R4 = guiCreateButton(226,128,57,26,"3",false,Tunning) Cerradura = guiCreateButton(226,250,57,26,"Cerrar",false,Tunning) addEventHandler ( "onClientGUIClick", Cerradura, Colse, false ) end function Colse () guiSetVisible (Tunning, not guiGetVisible ( Tunning ) ) end function SP1() triggerServerEvent("onSSP1", getLocalPlayer()) end function SP2() triggerServerEvent("onSSP2", getLocalPlayer()) end function SP3() triggerServerEvent("onSSP3", getLocalPlayer()) end
  11. Arsilex

    Guimecanico

    mira hize esto Server function Coches () if exports.factions:isPlayerInFaction ( thePlayer, 2) then triggerClientEvent ( "onAbrirmierda", getRootElement()) end end addCommandHandler ( "guimecanico",Coches) Client function guiToggleVisible ( ) if ( guiGetVisible ( Panel ) == true ) then -- check if the gui element is visible guiSetVisible ( Panel, false ) -- if it is, we hide it else guiSetVisible ( Panel, true ) -- if not, we make it visible end end addEvent( "onAbrirmierda", true ) addEventHandler( "onAbrirmierda", getRootElement(), guiToggleVisible) pero no abre el panel
  12. Arsilex

    Guimecanico

    me podrias poner un ejmplo
  13. Arsilex

    PayDay

    por que podria ser?
  14. Arsilex

    Guimecanico

    y como la paso a server side es que es if y encima el end abajo me jode un monton
  15. Arsilex

    Guimecanico

    function guimecanicos() if exports.factions:isPlayerInFaction ( source, 2) then Panel = guiCreateWindow(749,180,617,462,"Gui de mecanico",false) guiSetAlpha(Panel,0.69999998807907) guiWindowSetMovable(Panel,true) guiWindowSetSizable(Panel,false) Repair = guiCreateButton(12,29,84,39,"Reparar",false,Panel) addEventHandler ( "onClientGUIClick", Repair, RepararVehiculo, false ) guiSetAlpha(Repair,0.69999998807907) guiSetFont(Repair,"default-bold-small") Chapa1 = guiCreateButton(115,29,84,39,"Chapa1",false,Panel) addEventHandler ( "onClientGUIClick", Chapa1, Cambiarpintura1, false ) guiSetAlpha(Chapa1,0.69999998807907) guiSetFont(Chapa1,"default-bold-small") Chapa2 = guiCreateButton(216,30,84,39,"Chapa2",false,Panel) addEventHandler ( "onClientGUIClick", Chapa2, Cambiarpintura2, false ) guiSetAlpha(Chapa2,0.69999998807907) guiSetFont(Chapa2,"default-bold-small") Chapa3 = guiCreateButton(322,30,84,39,"Chapa3",false,Panel) addEventHandler ( "onClientGUIClick", Chapa3, Cambiarpintura3, false ) guiSetAlpha(Chapa3,0.69999998807907) guiSetFont(Chapa3,"default-bold-small") Cerrar = guiCreateButton(140,407,84,42,"Cerrar",false,Panel) addEventHandler ( "onClientGUIClick", Cerrar, Exit, false ) guiSetFont(Cerrar,"default-bold-small") Info = guiCreateMemo(436,24,172,428,"Informacion de precios\n\nReparar = 100$\nChapas = 250$\nNitrox10 = 750$",false,Panel) guiSetAlpha(Info,0.69999998807907) Sopiler = guiCreateButton(12,88,84,39,"Nitrox10",false,Panel) guiSetAlpha(Sopiler,0.69999998807907) guiSetFont(Sopiler,"default-bold-small") addEventHandler ( "onClientGUIClick", Sopiler, Sopiler1, false ) Saltoar = guiCreateButton(114,88,84,39,"Hydraulics",false,Panel) guiSetFont(Saltoar,"default-bold-small") guiSetAlpha(Saltoar,0.69999998807907) addEventHandler ( "onClientGUIClick", Saltoar, Salto, false ) Rued = guiCreateButton(216,88,84,39,"Ruedas",false,Panel) guiSetFont(Rued,"default-bold-small") guiSetAlpha(Rued,0.69999998807907) addEventHandler ( "onClientGUIClick", Rued, RuedasPanel, false ) Pita = guiCreateButton(322,88,84,39,"Tunning",false,Panel) guiSetFont(Pita,"default-bold-small") guiSetAlpha(Pita,0.69999998807907) addEventHandler ( "onClientGUIClick", Pita, Tunninga, false ) end end addCommandHandler ( "guimecanico",guimecanicos) Por que me sale ERROR: call: failder to call 'factions:isPlayerInFaction' [string "?"]
  16. Arsilex

    PayDay

    aora si se lo añadi pero sigue sin funcionar
  17. Arsilex

    PayDay

    nada no paga nada
  18. Arsilex

    PayDay

    mira ize esto y no me salen errores pero tampoco me da el money setTimer(function() if exports.factions:isPlayerInFaction ( thePlayer, 1) then givePlayerMoney(thePlayer, 1) end end, 150, 0)
  19. Arsilex

    PayDay

    nada los mismo errores
  20. Arsilex

    PayDay

    me salen 3 errores http://img515.imageshack.us/img515/8554/sinttulonds.png
  21. Arsilex

    [Ayuda]

    pos mira por alli pone local function findFromPhoneBook( number, name ) if name:lower( ) == "cab" or name:lower( ) == "taxi" then return 222 end if name:lower( ) == "police LS" or name:lower( ) == "police ranger" then return 911 end y despues sigue lo demas lo que pasa es que es para llamadas yo por ejemplo llamo a el 222 y el mensaje le llega al taxista pero si llamo al policia 911 no le llega
  22. Arsilex

    PayDay

    para añadirle un if? ? me refiero a esto if exports.factions:isPlayerInFaction ( thePlayer, 1) then
×
×
  • Create New...