Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Example: if ( money == 200 ) then -- Do something elseif ( money == 400 ) then -- Do something else end And you can keep using it.
  2. You could use the onClientPlayerWeaponSwitch event instead, so when he switches to the minigun, it'll trigger.
  3. function ( ) local weapon = getPedWeapon ( localPlayer, 7 ) if ( weapon == 38 ) then if ( getPedTotalAmmo ( localPlayer, 7 ) > 1 ) then triggerServerEvent ( "lol", localPlayer ) end end end setTimer ( , 100, 0 ) Using a timer isn't an efficient method though.
  4. Just create a big radararea + colshape around LS and when they enter, kill them, and set the "zombieProof" element data to the radar area, so they don't spawn inside it.
  5. In fact, there's one on the MTA community which is pretty much like what you are selling. https://community.multitheftauto.com/in ... ls&id=6039
  6. Don't take this wrong, but such script doesn't cost 20 euro.
  7. And to what things can you lock the spawner?
  8. getPedWeapon returns the weapon ID, just check if it's 38.
  9. Use the minigun weapon slot ( get it from the wiki page ), then check if he has the minigun on the slot.
  10. getWeaponAmmo is used for custom weapons, not players. You must use: getPedWeapon getPedTotalAmmo
  11. Why is it that expensive? how does it even work? can you create spawners from the game?
  12. Castillo

    Question

    That error appears when you login? if so, then the problem is that 'source' is not a player element.
  13. You must get the selected gridlist item using guiGridListGetSelectedItem, then you must get the item text using guiGridListGetItemText, and then you have to trigger a server side event using triggerServerEvent sending the vehicle name to the server side function ( which you have to make and add the event ), then on the server side you must get the vehicle model from it's name using getVehicleModelFromName and to finish, you get player's position and create the vehicle using createVehicle.
  14. Castillo

    Question

    Means that "r" is returning false or nil.
  15. What do you mean?
  16. So, it outputs "Fails"?
  17. You can make a table with all the country names for each country code. You can get the country code with this: local code = exports [ "admin" ]:getPlayerCountry ( source )
  18. Castillo

    Random player

    Yes, should work.
  19. I was answering to this guy: What did you edited, also the source is defined difficult by MTA.
  20. addCommandHandler has no 'source'.
  21. my_window = guiCreateWindow(0, 0, 1, 1, "", false) guiWindowSetSizable(my_window , false) guiSetVisible ( my_window , false ) guiSetAlpha(my_window , 10) my_image = guiCreateStaticImage(0.14, 0.09, 0.71, 0.79, "images/pda.png", true, my_window ) tabpanel = guiCreateTabPanel(107, 84, 770, 543, false, my_image ) closed = guiCreateButton(0.89, 0.27, 0.03, 0.13, "", true, my_image ) guiSetAlpha(closed, 0.15) guiSetProperty(closed, "NormalTextColour", "FFAAAAAA") bindKey ( "i", "down", function ( ) local state = ( not guiGetVisible ( my_window ) ) guiSetVisible ( my_window, state ) showCursor ( state ) end )
  22. El contenido de cada uno de los archivos .lua. P.D: Quita las mayusculas por favor.
×
×
  • Create New...