-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
It's working fine, are you sure you didn't put in meta.xml type="server"? GUI elements & DX drawing are only client side so type must be type="client"
-
You just wait 1 hour and think someone will answer? Be patient!!
-
Off-Topic: Could you make your Signature smaller please? its kinda big for just a text
-
, just copy the last code i posted, that is fixed one.
-
Remplace your "play.zip" resource with this one: http://www.mediafire.com/?k3od8cw1ep1gmpi
-
Uhm first, why you use such big text? Second, all depends on what game mode are you using.
-
try this then, vehicle = { [596]=true, [599]=true } function bwarp ( thePlayer, command, who ) local veh = getPedOccupiedVehicle(thePlayer) if veh then model = getElementModel(veh) if vehicle[tonumber(model)] then local aeg = getPlayerFromName ( who ) isPedInVehicle ( thePlayer ) warpPedIntoVehicle ( aeg, veh, 3 ) outputChatBox(getPlayerName(aeg).." is now at your vehicle!",thePlayer,0,255,0) end end end addCommandHandler ( "warp", bwarp )
-
I don't understand.. maybe use a better translator?
-
Please, don't double post, use "EDIT" button, Thanks.
-
post your whole script because here is no where setElementModel..
-
10 USD for 1000 LINES? this is a joke?
-
addEventHandler( "onPlayerChat", getRootElement(), function ( message, messageType ) if messageType == 0 then cancelEvent() end end)
-
For you or for all players? if only for you go to settings --> Binds and change them, if for all i don't know
-
------------------------------------- -- Code generated by DKR QT to Lua 0.1.6 -- -- Source: welcomeca.ui -- -- Date: 13/01/2011 - 14:27:20 -- ------------------------------------- function build_Dialog() local gui = {} gui._placeHolders = {} local screenWidth, screenHeight = guiGetScreenSize() local windowWidth, windowHeight = 400, 315 local left = screenWidth/2 - windowWidth/2 local top = screenHeight/2 - windowHeight/2 gui["_root"] = guiCreateWindow(left, top, windowWidth, windowHeight, "Dialog", false) guiWindowSetSizable(gui["_root"], false) gui[""] = guiCreateButton(231, 287, 77, 28, "OK", false, gui["_root"]) if on__clicked then addEventHandler("onClientGUIClick", gui[""], on__clicked, false) end gui[""] = guiCreateButton(314, 287, 77, 28, "Cancel", false, gui["_root"]) if on__clicked then addEventHandler("onClientGUIClick", gui[""], on__clicked, false) end gui["tabWidget"] = guiCreateTabPanel(0, 15, 391, 271, false, gui["_root"]) gui["tab"] = guiCreateTab("Tab 1", gui["tabWidget"]) gui["checkBox"] = guiCreateCheckBox(0, 230, 221, 18, "Don't show this window again", false, false, gui["tab"]) gui._placeHolders["textEdit"] = {left = 0, top = 0, width = 391, height = 231, parent = gui["tab"]} gui[""] = guiCreateScrollBar(0, 0, 100, 30,true, false, gui["tab"]) gui[""] = guiCreateScrollBar(0, 0, 100, 30,false, false, gui["tab"]) gui["tab_2"] = guiCreateTab("Tab 2", gui["tabWidget"]) gui["checkBox_2"] = guiCreateCheckBox(0, 230, 111, 18, "I accept the rules!", false, false, gui["tab_2"]) gui._placeHolders["textEdit_2"] = {left = 0, top = 0, width = 391, height = 221, parent = gui["tab_2"]} gui[""] = guiCreateScrollBar(0, 0, 100, 30,true, false, gui["tab_2"]) gui[""] = guiCreateScrollBar(0, 0, 100, 30,false, false, gui["tab_2"]) return gui, windowWidth, windowHeight end function on__clicked(button, state, absoluteX, absoluteY) if (button ~= "left") or (state ~= "up") then return end --TODO: Implement your button click handler here end function on__clicked(button, state, absoluteX, absoluteY) if (button ~= "left") or (state ~= "up") then return end --TODO: Implement your button click handler here end -- End of DKR QT to Lua code -- local gui = nil function guiShowHide() if not gui or not guiGetVisible(gui._root) then show() else hide() end end bindKey("F1","down",guiShowHide) function show() if not gui then gui = build_Dialog() else guiSetVisible(gui._root, true) end showCursor(true) end function hide() if not gui then return end guiSetVisible(gui._root, false) showCursor(false) end
-
use setElementPosition? after he spawns you will be moved to correct "spawn point". https://wiki.multitheftauto.com/wiki/SetElementPosition
-
Editor = {} Gate = {} Gate2 = {} Precision = {} status = {} coll = {} coll2 = {} coll3 = {} coll4 = {} -- this script mod is (no longer) PRIVATE -- - Deject3d function startBuilding(playerSource, commandName, objectid) if not objectid then outputChatBox("usage: /addgate objectid teamname", playerSource) return false end local team = getTeamName(getPlayerTeam(playerSource)) if team then team = getTeamName(team) else team = "" end end for i = 1,20 do if Editor[i] == playerSource then destroyElement(Gate[i]) Gate[i] = null Editor[i] = null Precision[i] = null end if Editor[i] == null then Editor[i] = playerSource -- set Editor[i] to who made the object --creating object -v local x,y,z = getElementPosition(playerSource) object = createObject ( objectid, x + 3,y + 3,z) interior = getElementInterior ( playerSource ) setElementInterior(object,interior) --created object -^ Gate[i] = object -- added object identifier to the array, corresponds to who created it Precision[i] = .5 -- default precision bindKey(playerSource, "i", "down", moveIt) bindKey(playerSource, "j", "down", moveIt) bindKey(playerSource, "k", "down", moveIt) bindKey(playerSource, "l", "down", moveIt) bindKey(playerSource, "mouse_wheel_up", "down", moveIt) bindKey(playerSource, "mouse_wheel_down", "down", moveIt) bindKey(playerSource, "pgup", "down", moveIt) bindKey(playerSource, "pgdn", "down", moveIt) bindKey(playerSource, "u", "down", moveIt) bindKey(playerSource, "o", "down", moveIt) bindKey(playerSource, "[", "down", moveIt) bindKey(playerSource, "]", "down", moveIt) bindKey(playerSource, "enter", "down", nextPosition ,objectid, team) bindKey(playerSource, "delete", "down", removeIt, playerSource) break -- done adding our object and who created it to the arrays... stop the loop end end P.S: I'm not using LUA tags because it would do the same
-
https://community.multitheftauto.com/index.php?p=resources&s=details&id=269
-
try this, if(message) then for playerKey, playerValue in ipairs(getAlivePlayers()) do local x1, y1, z1 = getElementPosition(playerValue) -- was a bad argument because you put wrong player arg local x2, y2, z2 = getElementPosition(playerValue) if(getDistanceBetweenPoints3D(x1, y1, z1, x2, y2, z2) <= 50) then outputChatBox("[uC]"..playerName..": "..message, playerValue, 25, 105, 25, true) -- nothing special, that I will have badargument here, too -.- end end
-
Hi everyone, i've got a big problem, i want to disable firing from some vehicles at my server but somehow it won't disable Secondary fire, disallowedVehicles = { 425, 520, 447, 476 } function disableFireForVehicles ( player , seat , jacked ) for i,v in pairs(disallowedVehicles) do if v == getElementModel(source) then toggleControl ( player, "vehicle_primary_fire", false ) setTimer( toggleControl, 50, 1, player, "vehicle_secondary_fire", false ) end end end addEventHandler ( "onVehicleEnter", getRootElement(), disableFireForVehicles ) i've tryied setting a timer but it still does same, is this a bug?
-
you aren't inserting any data in the sqlite db, you should insert it manually to test it, use sqlitebrowser (you can find it on mta community)
-
It works and you know that it does since i show you a pic in msn..
-
function addNitrosOxygen(command) for i,players in pairs (getElementsByType("player")) do if (isPedInVehicle (players)) then local vehicleUpgrade = getPedOccupiedVehicle (players) local vehicleUpgraded = addVehicleUpgrade (vehicleUpgrade, 1010) if (vehicleUpgraded) then outputConsole ("Nitro added to all players.", players) end end end end addCommandHandler ("addnitro", addNitrosOxygen) P.S: Next time try something before say "doesn't work"
