-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
I don't understand what do you mean, how do you mean "jump higher"?
-
There are many public Private Message resources, just download one and see how it works.
-
Is a event handler not a function.
-
No podes hacer eso.
-
Use the event onPlayerWeaponSwitch to check if the slot isn't 2, set it back to 2 with setPedWeaponSlot.
-
Events? do you mean functions? triggerServerEvent -- To trigger a server side event. getPlayerFromName -- To get a player element from a name. outputChatBox -- To send a chat message.
-
Que yo sepa no es posible hacer eso, pero el MTA tiene funciones para cambiar el handling.
-
GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Grid = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(195,222,474,334,"GUI Panel Private Messages",false) guiSetVisible ( GUIEditor_Window[1], false ) GUIEditor_Grid[1] = guiCreateGridList(290,108,165,204,false,GUIEditor_Window[1]) guiGridListAddColumn(GUIEditor_Grid[1],"Jugadores",0.2) GUIEditor_Memo[1] = guiCreateMemo(9,165,268,144,"",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(268,37,105,57,"Enviar",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(385,39,76,57,"Cancelar",false,GUIEditor_Window[1]) GUIEditor_Image[1] = guiCreateStaticImage(13,96,121,57,"images/BAT.png",false,GUIEditor_Window[1]) GUIEditor_Image[2] = guiCreateStaticImage(140,95,121,58,"images/shruk.png",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(11,33,236,45,"GUI Panel de mensajes Privados by ElMota",false,GUIEditor_Window[1]) for i, plr in pairs( getElementsByType( "player" ) ) do -- loop through the table of players local row = guiGridListAddRow( GUIEditor_Grid[1] ) -- add row for player guiGridListSetItemText( GUIEditor_Grid[1], row, 1, getPlayerName( plr ), false, false ) end function oppenz() guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) guiSetInputEnabled ( guiGetVisible ( GUIEditor_Window[1] ) ) end bindKey("F7","down",oppenz)
-
You want to block "fire" control or force the player to only use slot 1?
-
function zaa() for index, player in ipairs ( getElementsByType ( "player" ) ) do if getPlayerTeam (player) then local r, b, g = getTeamColor ( getPlayerTeam ( player) ) -- Lua is case sensetive. local araba = getPedOccupiedVehicle ( player ) if araba then setVehicleColor ( araba, r,g,b,r,g,b) end end end end addEventHandler("onMapStarting",getRootElement(),zaa)
-
You're asking help with a script you've stolen?
-
How to Make Gate Opened Only when Group Member are near that
Castillo replied to Jokeℝ1472771893's topic in Scripting
Click on the links I first posted and learn how their syntax. -
How to Make Gate Opened Only when Group Member are near that
Castillo replied to Jokeℝ1472771893's topic in Scripting
Then you better start from the basics. https://wiki.multitheftauto.com/wiki/Scr ... troduction http://www.lua.org/pil/index.html http://lua-users.org/wiki/TutorialDirectory -
How to Make Gate Opened Only when Group Member are near that
Castillo replied to Jokeℝ1472771893's topic in Scripting
No, we help you when you have trouble with your scripts, we don't accept requests here. -
How to Make Gate Opened Only when Group Member are near that
Castillo replied to Jokeℝ1472771893's topic in Scripting
moveObject isObjectInACLGroup createColRectangle onColShapeHit -
@sora: Copy the code again, I've updated a few things. @Aibo: Great, thanks.
-
@Buke: Your code is too long, upload it to http://pastebin.com/
-
-- client side: GarageW = guiCreateWindow(277,227,198,425,"My Garage",false) guiWindowSetSizable(GarageW,false) Add = guiCreateButton(15,389,169,22,"Add Current Vehicle",false,GarageW) GarageGL = guiCreateGridList(9,24,180,359,false,GarageW) guiGridListSetSelectionMode(GarageGL,2) Name = guiGridListAddColumn(GarageGL,"Vehicle Name",0.6) guiGridListAddColumn(GarageGL,"ID",0.2) guiSetVisible(GarageW, false) bindKey ( "F2", "down", function ( ) guiSetVisible ( GarageW, not guiGetVisible ( GarageW ) ) showCursor ( guiGetVisible ( GarageW ) ) end ) function AddF() local v = getPedOccupiedVehicle( localPlayer ) if ( v ) then local vName = getVehicleName( v ) local colr1, colg1, colb1, colr2, colg2, colb2, colr3, colg3, colb3, colr4, colg4, colb4 = getVehicleColor( v ) local upgrades = getVehicleUpgrades ( v ) local RowName = guiGridListAddRow ( GarageGL ) guiGridListSetItemText ( GarageGL, RowName, Name, vName, false, false ) guiGridListSetItemData ( GarageGL, RowName, Name, { color = { colr1, colg1, colb1, colr2, colg2, colb2, colr3, colg3, colb3, colr4, colg4, colb4 }, upgrades = upgrades } ) end end addEventHandler ( "onClientGUIClick", Add, AddF ) function onDoubleClick ( button, state ) if ( source == GarageGL ) then local row, col = guiGridListGetSelectedItem ( source ) if ( row and col and row ~= -1 and col ~= -1 ) then local vehicleName = guiGridListGetItemText ( source, row, 1 ) local vehicleData = guiGridListGetItemData ( source, row, 1 ) triggerServerEvent ( "spawnCarGS", localPlayer, vehicleName, vehicleData ) end end end addEventHandler ( "onClientGUIDoubleClick", root, onDoubleClick) -- server side: addEvent("spawnCarGS", true) addEventHandler("spawnCarGS", root, function( vehicleName, vehicleData ) local x, y, z = getElementPosition ( source ) local vehicle = createVehicle ( getVehicleModelFromName ( vehicleName ), x, y, z ) setVehicleColor ( vehicle, unpack ( vehicleData.color ) ) warpPedIntoVehicle ( source, vehicle ) if ( vehicleData.upgrades and type ( vehicleData.upgrades ) == "table" ) then for upgradeKey, upgradeValue in ipairs ( vehicleData.upgrades ) do addVehicleUpgrade ( vehicle, upgradeValue ) end end end ) Code updated.
-
Youy can use the function getPlayerIdleTime to get player idle time.
-
No hay de que. Tema cerrado.
-
How can we tell you what's wrong if you don't tell us what doesn't work.
-
There you go.
-
function offPlayerChangeNick () cancelEvent () -- stop the event from occuring end addEventHandler ( "onPlayerChangeNick", root, offPlayerChangeNick ) -- What is "huntedPlayer"?