Jump to content

Puma

Members
  • Posts

    240
  • Joined

  • Last visited

Everything posted by Puma

  1. function a() camara = setCameraMatrix( source, 1654.2763671875, -1670.05078125, 21.4375, 1654.16162, -1661.63123, 21.9 ) setElementDimension( camara, 2 ) end addEvent("cm", true) addEventHandler("cm", root, a) function e( ) local money = getPlayerMoney ( source ) if (money >= 15000) then takePlayerMoney( source, 15000 ) else outputChatBox( " tu Dinero es "..money.." y necesitas $15000 para comprarte un skin " ) end end addEvent("qtm", true) addEventHandler("qtm", getRootElement(), e) function playerQuits () local playeraccount = getPlayerAccount ( source ) -- get the player's account if ( playeraccount ) and not isGuestAccount ( playeraccount ) then -- if the player is logged in local skin = getElementModel( source ) -- get skin accountdata setAccountData ( playeraccount, "skins", skin ) -- save current skin to account end end addEventHandler ( "onPlayerQuit", getRootElement ( ), playerQuits ) function playerLogin ( _, playeraccount ) -- player logs in if playeraccount then -- if account that he logged into, exists local skins = getAccountData ( playeraccount, "skins" ) -- get skin accountdata if skins then -- if he has skin accountdata setElementModel ( source, skins ) -- give him the skin end end end addEventHandler ( "onPlayerLogin", getRootElement(), playerLogin ) function playerSpawns () -- called when a player spawns local account = getPlayerAccount ( source ) -- get the player's account if account and not isGuestAccount ( account ) then -- if he's logged in on an account local skin = getAccountData ( playeraccount, "skins" ) -- get skin accountdata if skin then -- if he has skin accountdata setElementModel ( source, skin ) -- give him the skin end end end addEventHandler ( "onPlayerSpawn", getRootElement(), playerSpawns ) -- when player spawns, call playerSpawns function This should do it. Saves skin when you quit, gives you the skin when you login or spawn.
  2. Puma

    random vehicles

    In that video, it's not about random vehicles. It just changes your vehicle when you drive through a checkpoint. If that's what you mean, here's an explanation of how to do it: You don't need a script. When you're in the map editor, in the topmenu go to EDF (Definitions) and add "Race". Then, at the bottom left, you position your mouse on the icons and scroll. The icons should change and after a few scrolls you should see the race-icons: pickup, spawnpoint and marker (I'm not sure what icons and in what order). When you place or select a checkpoint, you press F3 and a small menu-window will appear. In this window, you can set a vehiclemodel if I'm right (when you hit the checkpoint, your vehicle will be changed into the one set). Another option, is to create a pickup (map editor, bottom left menu icons, be sure it is a RACE pickup and not a normal pickup), select it, press F3, set 'type' to 'vehiclechange' and select a vehicle in the vehiclemodel space thingie.
  3. Puma

    increase damege

    This page explains it all: https://wiki.multitheftauto.com/wiki/SetWeaponProperty
  4. Haven't tested nor used it, but I think you mean onClientGUIBlur. https://wiki.multitheftauto.com/wiki/OnClientGUIBlur When you click outside a window, it looses focus. When this event is triggered, you simply hide/destroy/disable/dowhateveryouwanttodowith the gui-stuff.
  5. function spawn() if spawnPlayer then getAccountData ( playeraccount, "skins" ) setElementModel ( source ) end end addEventHandler("onClientPlayerWasted", getRootElement ( ), spawn) What do you want to do with it? It saves your skin when you quit and gives you the skin when you login. Your script doesn't work, because the skin isn't set when you spawn and therefore the mistake is in the last function. There's no 'onClientPlayerWasted' event serverside (all CLIENT events have CLIENT in the eventname), you should use 'onPlayerWasted'. When the player dies, you respawn him at first, then request the 'skins'-accountdata (if he has an account and if it's not a guestaccount) and if he has accountdata on 'skins', you set his skin (model) to that skin.
  6. Puma

    Nyancars

    Just a small script I made for fun using 3D-lines. If you start the script, it draws nyancat-rainbows behind every vehicle. Script is not optimized for vehicles being destroyed etc and has a few bugs if you change the numbers at the top (right now they're fine, like you see in the video). Only thing I'm not satisfied about, is the way the corners are visible when you look at the rainbow from a bad angle. If you want to take a look at it or use it: http://pastebin.com/BsSq6SQj Raw version (since pastebin kinda fucks up the lines): http://pastebin.com/raw.php?i=BsSq6SQj Please notify me if you're going to use it for something and give me credit if you do.
  7. It isn't . It's not a freeroam server. It's additional to the public race-server, where you earn your money doing races and minigames and other stuff like that. The shopserver is what the name implicates: 'just a server' where you spend your money on tuning your cars, buying a playerskin etcetera, it's not meant as a freeroam server where you spend hours on freeroaming. It's got only eight playerslots.
  8. Finally, a project that I've been working on the past year, is DONE! If you are interested in checking it out, join it at this ip and port: mta-pac.nl:22001 or click here: JOIN NOW
  9. Ehm... Just use "/bindkey chatbox adminchat" and you're done. You don't need script for it .
  10. "Just because I can". And was playing Garry's Mod at the time .
  11. Found out about this subforum and thought it'd be a good place to show some of my mods. And some video's: For more mods and downloads, check out my GTAGarage profile (click "all mods by this member" for a list): http://www.gtagarage.com/users/profile.php?M=149040 My modding site: http://www.pumastudios.nl And my YouTube-account with a lot of video's on it: https://www.youtube.com/user/StijnLinderman
  12. Try at GTAForums.com, a lot more modders there.
  13. Oh lol. Well I'm not that such a sophisticated scripter . Just did this myself and thought that maybe people could use it too.
  14. I wanted the player nametags to display the colorcodes they got in their names, so I did a script for that. Thought it'd be nice to share it, I'm sure this script comes in very handy, as there is no colorcode support in the current dx-function to draw text. Made a util function of it. ___________________________________ Here it is: http://pastebin.com/iFVC9dLT Raw script (if you want to copy it, use this link!): http://pastebin.com/raw.php?i=iFVC9dLT NOTE: Be sure to include the 'hexToRGB'-function, the script won't work without it! ___________________________________ Syntax: dxDrawTextColorCoded ( string text, int left, int top, [ int alpha = 255, float scale = 1, mixed font = "default", bool clip = false, bool postGUI = false ] ) Required arguments: Text: Your text Left: Left textbox limit Top: Top textbox limit Optional: Alpha: Alpha (0-255) Scale: Text scale Font: Built in dx-font (string) or a dx font-element Clip: Cut text off if it sticks out of the box PostGUI: Set to true if text should be rendered after GUI NOTE: Aligning text is not supported! You only supply an argument for the top left starting position and the script does the rest, according to the text scale and font. ___________________________________ Short example: function render () dxDrawTextColorCoded ( "Test no color yet #ffaa00yaay orange #00ff00and now friggin' green #0101ffand some blue stuff", 500, 500 ) dxDrawTextColorCoded ( "B#ff0000L#00ff00A#0000ffH", 500, 500, 150, 4, "bankgothic" ) end addEventHandler ( "onClientRender", getRootElement(), render ) Result: ___________________________________ Have fun with it, I hope it's useful ! (maybe something for "Useful functions" page on wiki?)
  15. Puma

    Building mods

    I need a beer. Can someone get me a beer?
  16. Puma

    Ingame radio

    No download, everything I make is exclusively for our server .
  17. Puma

    Ingame radio

    The radio only pops up when you press the shortkey (default is F2) and the same key is used to close it again. I could place it a bit higher on the screen though.
  18. Imo that window next to the gui with the names of the authors and even bèta testers (......) is pretty lame. Best way to put your name in it (if you even want that) is to do it in the window title (for example "Radio stations - by Me"). And why use two lists, a 'used' and an 'unused' list? You can only listen to one channel at once.. You might wanna check out my radio for some inspiration, it's a lot smaller and has the same functions as yours. Maybe you could make a button that opens/closes the channels-gridlists?
  19. Puma

    Ingame radio

    I know, this probably has been made a lot of times already. I don't mind showing it though, because I'm satisfied with the result (the looks, manageability etc.). One of the (imo quite handy) features, is that it saves your last used channel and volume and, when you join next time, it automatically changes to the last used ones . I know it's not very hard to do it, but if you guys have any good, useful other features, let me know!
  20. Lol, someone stole my race-pickup models. https://community.multitheftauto.com/index.php?p= ... ls&id=2941 I made the nitro- and repair-pickups and he probably stole the vehiclechange-pickup from someone else.. Also, my map "Tame the cube" was uploaded by someone: https://community.multitheftauto.com/index.php?p= ... ls&id=2371 Could someone please remove these two ?
  21. https://www.youtube.com/watch?v=DrjPQ1Z2coE You might wanna contact the author of that video, he says he made it in the video's description.
  22. One of the big projects I'm working on is the so called 'shop server' that belongs to the MTA-community I'm co-owner of. This video shows the tuning-shop, in which you tune your vehicles. The features you buy in the shop will be added to your vehicles once you get that vehicle in the actual race-server.
  23. You can't make it serverside, because there's GUI in it.
  24. Got it fixed, but the way I did it is just stupid. For some reason the rotation you fill in at createPed doesn't matter, it always becomes 0 so they face north. After a ped spawns, you gotta give it the rotation using setElementRotation ( ped, 0, 0, rotation ), not setPedRotation ( ped, rotation ) as you would expect. But, when you need a ped's rotation, you gotta use getPedRotation ( ped ) and not getElementRotation ( ped ). What the hell 0.o? Doesn't make any sense if you ask me.
  25. Just odd, the problem occured after I switched to 1.1. While the server was 1.0, all peds were rotated as they should. I updated the server to 1.1 and all peds face north. When I loop through all peds and output their rotation, I get rotations like 80, 90, 270 and 315, but still all peds are facing north. This is my clientside script, maybe there's something that 1.0 can handle but 1.1 can't: http://pastebin.com/pPWz40uZ No errors or whatsoever btw. When I output the rotations, the rotation I gave to them in that script is output, so that isn't the problem. The problem, in short terms, is that they're facing north while having a different rotation that should not make them face north. I just don't get it, I hope one of you guys does and is able to help me with it .
×
×
  • Create New...