-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
Este recurso: https://community.multitheftauto.com/index.php?p= ... ls&id=1152 Tiene spawns, pero no protegidos.
-
Cuando dices spawns yo pienso en un recurso tipo el de 50p que tiene ciudades y facciones.
-
Should return true if 0.5 or higher of amount of the control is pressed, false otherwise. I may be wrong, but I think it should return that.
-
ElMota: Para hacer que los ped's disparen es mucho mas dificil, hay un recurso llamado "slothbot", pero no es muy bueno la verdad, y no funciona como vos queres.
-
local ped = createPed(0, 0, 0, 5, 360) -- Creamos un PED en las coordenadas: 0, 0, 5 con el skin de CJ y con rotacion 360. setElementFrozen(ped, true) -- Congelamos al PED asi nadie lo puede mover. setTimer(giveWeapon,2000,1,ped,31,9999,true) -- Creamos un timer de 2 segundos para darle un M4 al ped. El argumento numero 5 de createPed es la rotacion.
-
local ped = createPed(0, 0, 0, 5) -- Creamos un PED en las coordenadas: 0, 0, 5 con el skin de CJ. setElementFrozen(ped, true) -- Congelamos al PED asi nadie lo puede mover. setTimer(giveWeapon,2000,1,ped,31,9999,true) -- Creamos un timer de 2 segundos para darle un M4 al ped.
-
local ped = createPed(0, 0, 0, 5) -- Creamos un PED en las coordenadas: 0, 0, 5 con el skin de CJ. setElementFrozen(ped, true) -- Congelamos al PED asi nadie lo puede mover.
-
local updTypes = { "upd", "vehiclechange", "nitro", "end" } local count = 1 for i, t in ipairs(updTypes) do local info = xmlFindChild(ghost, t, 0) while info do if info then outputChatBox("Found ".. t .." at index ".. count) end info = xmlFindChild(xmlFile, t, count) count = count + 1 end end The output: Found upd at index 1 Found upd at index 2 Found upd at index 3 Found upd at index 4 Found upd at index 5 Found upd at index 6 Found upd at index 7 Found upd at index 8 Found upd at index 9 Found upd at index 10 Found upd at index 11 Found upd at index 12 Found end at index 13
-
The more turfs you create, the bigger the XML file is, that'll start causing lag, I would suggest to either use: SQLITE or MySQL. P.S: In my opinion SQLITE is easier than XML.
-
I suggest you to either search on: https://community.multitheftauto.com/ for resources that could fit your needs, or start learning how to script. https://wiki.multitheftauto.com/wiki/Scr ... troduction https://wiki.multitheftauto.com/wiki/Int ... ng_the_GUI
-
After months of not releasing anything I've decided to rewrite this resource to be more efficient and fix the bugs it had. Today I've used my free time to do it, I've added 13 exported functions to manage the resource (check main post to get info about them). I know many people has been reporting that it was bugged, so here it is, as far as I've tested it has no bugs so far. Edit: I forgot to mention that /gangs won't open if there aren't any gang created.
-
Hay dos recursos de drifting que yo sepa, talvez ayude en el otro .
-
You're welcome .
-
Never use takePlayerMoney client side, because it'll not really take it. -- client side: function onClientGUIClick (button, state, absoluteX, absoluteYe) local selectedTab = guiGetSelectedTab(myTabPanel) -- Specify your tab panel here. local money = getPlayerMoney () if (selectedTab == TabItems) then if (source == WepBtnSHOVEL) then if (money >= 300) then outputChatBox ("You bought a SHOVEL for $300",225,225,0) triggerServerEvent ("GiveSHOVEL",localPlayer) else outputChatBox ("Your funds are too low") end elseif (source == WepBtnKATANA) then if (money >= 500) then outputChatBox ("You bought a KATANA for $500",225,225,0) triggerServerEvent ("GiveKATANA",localPlayer) else outputChatBox ("Your funds are too low") end end end if (source == StephCloseBtn) then guiSetVisible (StephMission, false) showCursor (false) end end addEventHandler ("onClientGUIClick", getRootElement(), onClientGUIClick) -- server side: function GiveSHOVEL () giveWeapon (source,6,1,true) takePlayerMoney(source,300) end addEvent("GiveSHOVEL",true) addEventHandler("GiveSHOVEL",getRootElement(),GiveSHOVEL) function GiveKATANA () giveWeapon (source,8,1,true) takePlayerMoney(source,500) end addEvent("GiveKATANA",true) addEventHandler("GiveKATANA",getRootElement(),GiveKATANA)
-
Con esa funcion creas una tabla en la base de datos, luego usas las funciones que necesites para lo que quieras hacer.
-
Claro, para eso son las bases de datos. Pero te aconsejo que empiezes con algo mas facil si no tenes mucha idea.
-
Ni idea, nunca use ese recurso la verdad.
-
function generateCode() local number1 = math.random(20, 40) local number2 = math.random(100, 900) local number3 = math.random(100, 900) local result = number1.."."..number2.."."..number3 return result end addEventHandler('onPlayerLogin',root, function(_,account) local select = executeSQLQuery("SELECT * FROM Phone WHERE player='".. getAccountName(account) .."'") -- Account returns an account userdata, not an account name. if not select or #select == 0 then local code = generateCode() executeSQLQuery("INSERT INTO Phone VALUES ( '".. getAccountName(account) .."','".. code .."' )") local select2 = executeSQLQuery("SELECT number FROM Phone WHERE player='".. getAccountName(account) .."'") outputChatBox('#ABCDEF* #ffffffYour phone number is: '..select2[1]['number'],source,255,255,255,true) else local select3 = executeSQLQuery("SELECT number FROM Phone WHERE player='".. getAccountName(account) .."'") outputChatBox('#ABCDEF* #ffffffYour phone number is: '..select3[1]['number'],source,255,255,255,true) end end )
-
SQLITE es un sistema de bases de datos, para guardar informacion.
-
Felicitaciones Luis! Espero que seas un buen padre .
