Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. They are drawn by: dxDrawText
  2. You want to disable the: left and right controls?
  3. Castillo

    Help!!

    1: You have set the script types with upper case @ meta.xml: type="Client" should be type="client", same for the other. 2: Your script has a event to show the GUI, but you never trigger it because you never use the function to trigger it @ server side.
  4. Go to your modem page and open them.
  5. Use the example on the wiki page ( what denny edited ). https://wiki.multitheftauto.com/wiki/FetchRemote
  6. addEventHandler ( 'onPlayerChangeNick', root, function ( oldNick, newNick ) if string.find ( newNick, '#%x%x%x%x%x%x' ) then outputChatBox ( "You can't use HEX codes.", source, 255, 0, 0 ) cancelEvent ( ) end end ) That'll not change the nick if new one has HEX codes, and it'll send a message to the player.
  7. Good work, I made a similar function ( not a library ) with DirectX.
  8. Castillo

    Ayuda

    Es muy simple, ejecuta la funcion: setGameSpeed en el client side y no en el server side.
  9. I think he's talking about the resources that doesn't work on 1.3.1, but they worked on 1.0.5.
  10. 1: I think is not possible. 2: guiGridListSetSortingEnabled
  11. hWnd_Commands = guiCreateWindow( 0.2, 0.2, 0.6, 0.6, "Admin Commands", true ) hGrid_Admin = guiCreateGridList( 0.1, 0.1, 0.8, 0.6, true, hWnd_Commands ) local hGrid_Row_Admin = nil; hColumn_Admin1 = guiGridListAddColumn( hGrid_Admin, "Command", 0.4 ) hColumn_Admin2 = guiGridListAddColumn( hGrid_Admin, "Effect", 0.4 ) hColumn_Admin3 = guiGridListAddColumn( hGrid_Admin, "Additional Info", 0.4 ) local hAdmin_Commands = { 'kill "name"'; } for _, cmd in ipairs ( hAdmin_Commands ) do local hGrid_Row_Admin1 = guiGridListAddRow(hGrid_Admin) guiGridListSetItemText(hGrid_Admin, hGrid_Row_Admin1, hColumn_Admin1, cmd, false, false) end
  12. Gridlists can't have numbers as row text.
  13. You want to replace the bind with a command? if so: throwWeaponPickup = {} function throwWeapon(thePlayer) if (not isPedInVehicle(thePlayer)) then local theIDweapon = getPedWeapon(thePlayer) local theTotalAmmo = getPedTotalAmmo(thePlayer) if theIDweapon then local x,y,z = getElementPosition(thePlayer) local rot = getPedRotation(thePlayer) x = x + ((math.cos(math.rad(rot + 90))) * 2.5) y = y + ((math.sin(math.rad(rot + 90))) * 2.5) for i,players in ipairs(getElementsByType("player")) do local px,py,pz = getElementPosition(players) if getDistanceBetweenPoints2D(x, y, px,py) < 2 then --//If the distance from the player's point of pickup truck dumping jetty is given weapons to this player. if (getPedWeapon(players, getSlotFromWeapon(theIDweapon)) == 0) then --//Check whether the player has a slot for this weapon, it is not blocked. takeWeapon(thePlayer, theIDweapon) giveWeapon(players, theIDweapon, theTotalAmmo) outputChatBox(getPlayerName(thePlayer).." gave you [Weapons]: "..getWeaponNameFromID(theIDweapon)..", [Patrons]: "..tostring(theTotalAmmo), players, 184, 138, 0) outputChatBox("you have transferred [Weapons]: "..getWeaponNameFromID(theIDweapon)..", [Patrons]: "..tostring(theTotalAmmo)..", "..getPlayerName(players), thePlayer, 184, 138, 0) return 0 else outputChatBox(getPlayerName(players).." already has weapons of this type! ", thePlayer, 184, 138, 0) return 0 end end end takeWeapon(thePlayer, theIDweapon) throwWeaponPickup[#throwWeaponPickup+1] = createPickup(x, y, z, 2, theIDweapon, 10000, theTotalAmmo) end end end addCommandHandler ( "dropwep", throwWeapon )
  14. Is easier to use: getValidPedModels to get all valid skin models. Also, the spawnPlayer function has a skin argument. addEventHandler ( "onPlayerJoin", root, function ( ) spawnPlayer ( source, 0, 0, 3, 0, getValidPedModels ( ) [ math.random ( #getValidPedModels ( ) ) ] ) end )
  15. Castillo

    get

    You're welcome.
  16. Maybe this resource could do the job: https://community.multitheftauto.com/ind ... ils&id=672
  17. Castillo

    get

    You can use this function: https://wiki.multitheftauto.com/wiki/GetResourceSettings
  18. Create a .lua file and a meta.xml and you put: -- lua file: addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) setCloudsEnabled ( false ) end ) -- meta.xml:
  19. You can search for hosters here: viewforum.php?f=116
×
×
  • Create New...