Jump to content

pa3ck

Members
  • Posts

    1,141
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by pa3ck

  1. I don't think set and getElementData would do any harm, if you're not setting 100's of them.
  2. Hiya. I was looking at shaders, but it just won't stick into my head.What I want to do is, I have a dff and txd for a vehicle, but I want to apply shaders for different vehicle elements. I mean, I'll have the same texture but the number is going to change on it ( on the texture, probably I'll need an image file? ). Is it possible to do it without having a seperate texture for every number? I don't know, if I clearly explained it to yous, but that's the best way I could explain. Just like this topic: viewtopic.php?f=91&t=74142&p=685257 . I want the same thing, except, I want the shader to be 'flexible' so that I can set my text or number in-game.
  3. Well, all I can see for wheels are dummies. So I guess there's no way rotating the wheels manually, right?
  4. Hiya, I was tryna get the rotation of the left and right front wheels, but I just can't get their names. Anybody knows them?
  5. function startCountDown(player) if isElement(player) then triggerClientEvent(player, "startCountDown", player) else outputDebugString ( "Bad element pointer @ startCountDown", 0 ) end end
  6. pa3ck

    setRuleValue

    The rule you set is going to show up in server browsers like game-state.com under 'Server Variables'.
  7. Well, I know if you don't define the type ( client, server ) at the script, it's gonna be server by default, but I don't know if it works like that with an export function. Try to put type="server" and see if it works. Also, I'd put an 'else' statement after the 'isElement' just to make things easier and see if the passed argument is an element or not.
  8. It is possible. Just create a html file with the word you want then use fetchRemote.
  9. Literally everything. https://wiki.multitheftauto.com/wiki/Main_Page, check the examples first.
  10. -- server function halAdas () exports.global:giveItem(client, 149, 1) end addEvent("halKifogas", true) addEventHandler("halKifogas", getRootElement(), halAdas)
  11. screen -R taskID / screen name
  12. Yea, that was the problem, thank you.
  13. Hello there, I was trying to compile one of my lua files but I'm getting this error 'ERROR Could not compile file'. Any idea why is that?
  14. Thanks for your answer, I got it fixed already a few minutes ago ( the way you mentioned ).
  15. Hi there, I just set up an MTA server today but I'm having issues with MySQL. I get the following error [22:11:21] ERROR: Could not load /opt/mta_srv/mods/deathmatch/./dbconmy.so - lib mysqlclient.so.15: wrong ELF class: ELFCLASS64[22:11:21] ERROR: sql/server.lua:1 : dbConnect failed; Could not connect Any help would be appreciated.
  16. Hi there, is there any function or method used for getting the IP address of the server? Not the IPv4, but like 37.xxx.xxx.xx.
  17. Exports are for inter-resource communication, and you cannot call server exports from the client, nor vice-versa. I meant with the triggers, but yea, SetElementData is much better.
  18. triggerServerEvent returns true if it was succefully sent, false otherwise. You can't do it like that, you either make a triggerClientEvent from server side to client side to return true / false or create an exports function which returns true if a player is in the VIP group false otherwise.
  19. @line 5 setElementHealth ( getPlayerFromName ( playername ), 20 )
  20. pa3ck

    [HELP]Dealer

    What about table? Wouldn't it be much handier? local markers = {} function consoleCreateMarker ( thePlayer, commandName ) if not markers [ thePlayer ] then local x, y, z = getElementPosition ( thePlayer ) markers [ thePlayer ] = createMarker ( x, y, z - 1, "cylinder", 1.5, 255, 0, 0, 170 ) if ( markers [ thePlayer ] ) then setElementData(markers [ thePlayer ], "markerType", "WeaponShop") setElementFrozen( thePlayer, true ) outputConsole ( "Marker created successfully", thePlayer ) else outputConsole ( "Failed to create marker", thePlayer ) end else outputChatBox ( "You're selling already.", thePlayer, 255, 0, 0 ) end end addCommandHandler ( "sell", consoleCreateMarker, false, false ) function para( thePlayer, commandName ) if markers [ thePlayer ] then setElementFrozen( thePlayer, false ) destroyElement( markers [ thePlayer ] ) markers [ thePlayer ] = nil else outputChatBox ( "You haven't started selling yet.", thePlayer, 255, 0, 0) end end addCommandHandler ("stopsell", para, false, false)
  21. I just tried it myself, but I got a black dxDraw. --SERVER addCommandHandler ( "screens", function ( p, cmd, targetPlayer ) if not targetPlayer then return end local tName, tPlayer = exports.global:getPlayer ( p, targetPlayer ) triggerClientEvent ( tPlayer, "updateSource", tPlayer ) triggerClientEvent ( p, "viewSource", p, tPlayer ) end ) --CLIENT addEvent ( "updateSource", true ) addEventHandler ( "updateSource", root, function () local sSource = dxCreateScreenSource ( 500, 500 ) if isElement ( sSource ) then outputChatBox ( "dxSource created" ) else outputChatBox ( "Error creating dxSource" ) end setElementData ( source, "screenSource", sSource ) end) addEvent ( "viewSource", true ) addEventHandler ( "viewSource", root, function ( tPlayer ) function handle() screenSource = getElementData ( tPlayer, "screenSource" ) dxDrawImage (0, 0, 500, 500, screenSource ) end addEventHandler ( "onClientRender", root, handle ) --outputChatBox ( tostring ( getElementData ( tPlayer, "screenSource" ) ) ) end)
  22. I don't know if you are at the right section for these kind of things, but I do like your idea. First, I thought ( just by the title ) you'll want to make a gamemode like League of Legends but yea, sounds good. About the title, I'd rather call it like 'Take it over' or something like that, because you won't actually destroy the base but taking it over.
×
×
  • Create New...