-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
Copy the code again. P.S: 10000 - 3500 = 6500 .
-
function buyMap(player, command, ...) local money1 = tonumber(getElementData(player,"Money")) if g_ForcedNextMap then outputChatBox( 'Next map is ' .. getMapName( g_ForcedNextMap ), player ) return end local query = #{...}>0 and table.concat({...},' ') or nil if not query then if g_ForcedNextMap then outputChatBox( 'Next map is ' .. getMapName( g_ForcedNextMap ), player ) else outputChatBox( 'Next map is not set', player, 255, 0, 0 ) end return end local map = findMap(query) if not map then outputChatBox(errormsg, player) return end if(money1 >= 3500) then if lastmap_B == map then outputChatBox( 'That map has been played too much recently.', player, 255, 0, 0 ) else g_ForcedNextMap = map outputChatBox(getPlayerName(player).. " bought map '" ..getMapName(g_ForcedNextMap).. "' for $3500. (/bm)", g_Root, 0, 240, 0) setElementData(player, "Money", money1-3500) lastmap_B = g_ForcedNextMap end else outputChatBox("You don't have enough money. ($3500)", player, 255, 0, 0) end end addCommandHandler('bm', buyMap) addCommandHandler('buymap', buyMap)
-
Oh, yo puse las funciones del MTA, me equivoque. addCommandHandler("flip", function(thePlayer, flip, ammount) if tonumber(ammount) > tonumber(getElementData(thePlayer,"data.money")) then outputChatBox("You don't have that kind of money",thePlayer,255,0,0) elseif ammount > 1000 then outputChatBox("You can't flip more than 1000$",thePlayer,255,0,0) end local money = tonumber(getElementData(thePlayer,"data.money")) if math.random ( 2 ) == 1 then setElementData(thePlayer, "data.money", money+tonumber(ammount)) else setElementData(thePlayer, "data.money", money-tonumber(ammount)) end end)
-
De nada. "Post Scripting"? que es eso?
-
You can create your own "window" with some knowledge. P.S: Why would you create a window then a image...? just create a image .
-
function getServerMaps() local mapsTable = {} for resourceKey, resourceValue in ipairs(getResources()) do local name = getResourceInfo ( resourceValue, "name" ) local type = getResourceInfo ( resourceValue, "type" ) local author = getResourceInfo ( resourceValue, "author" ) local game = getResourceInfo ( resourceValue, "gamemodes" ) if (type == "map" and game == "race") then table.insert(mapsTable, {name=name, author=author or "Unknown"}) end end return mapsTable end Esa funcion deberia cargar todos los mapas que sean para el game mode "race" en una tabla y devolverla cuando ejecutas la funcion. Ejemplo: local mapas = getServerMaps() for index, map in pairs(mapas) do outputChatBox(tostring(map.name) ..": ".. tostring(map.author)) end P.S: El script es server-side.
-
Con este recurso: https://community.multitheftauto.com/index.php?p= ... ils&id=538 podes hacer que caiga nieve.
-
MTA:SA 1.1 Released: Harder, Better, Stronger, Faster
Castillo replied to darkdreamingdan's topic in News
MrFox, waiting for what? -
addCommandHandler("flip", function(thePlayer, flip, ammount) local money = tonumber(getElementData(thePlayer,"data.money")) local suerte = math.random(0,1) if (tonumber(ammount) > money) then outputChatBox("You don't have that kind of money",thePlayer,255,0,0) end if (ammount > 1000) then outputChatBox("You can't flip more than 1000$",thePlayer,255,0,0) end if (suerte == 1) then givePlayerMoney(thePlayer, tonumber(ammount)) elseif (suerte == 0) then takePlayerMoney(thePlayer, tonumber(ammount)) end end)
-
Evil-Cod3r, if you don't know how to do it then don't reply. @Blaawee: GUI windows are kinda rectangular with a little rounded, you can't change the form of how it looks.
-
Well, in my opinion that's up to you, you can spend 2-3 hours and take a break.
-
Vehicle mod: https://community.multitheftauto.com/index.php?p= ... ls&id=3326
-
My bad, I meant data.money .
-
addEventHandler("onClientCursorMove", root, function( _, _, _, _, wx, wy, wz ) local cx, cy, cz = getCameraMatrix() x1 = ( wx - cx ) / 300 y1 = ( wy - cy ) / 300 z1 = ( wz - cz ) / 300 end ) That's from cod2mod.
-
Replace getPlayerMoney() with getElementData(localPlayer,"data.money")
-
The "race starter pack" resource does not use the normal GTA money system, it uses element data.
-
Los slothbots funcionan en el MTA 1.1.1 pero hay que editar algo para que funcione. Igual, no son muy buenos .
-
This resource is not made by him, but me: https://community.multitheftauto.com/index.php?p= ... ls&id=3323
-
Evil-Cod3r, you really can't talk about stealing, your "War Shop" has parts of my "Shop" resource uploaded to the MTA community, I haven't told you anything, but now I really feel like I should. So please, stop fighting if you're one of these who copy scripts form someone else without their permission.
-
What has volume to do with the speed?
-
Really, why doesn't people spend some time in the wiki? there are function/event examples. https://wiki.multitheftauto.com/wiki/GuiCreateGridList
-
When I see that is a stolen script, I don't help them, but I couldn't know, maybe it was a resource from the MTA community and he was just editing it, I can't download every resource and compare them .
-
https://community.multitheftauto.com/index.php?p= ... ls&id=3319 That's not really made by him.
-
This will remove the script files, not the skin/vehicle mods and so on.
