Jump to content

FatalTerror

Members
  • Posts

    304
  • Joined

  • Last visited

Posts posted by FatalTerror

  1. Hi there,

    I've a problem when I attach two vehicles using attachElements. The camera is strangely placed and I dunno how fix it, dunno even if it's possible.

    04451b4b40.jpg

    As you can see in the screen, I've two vehicles who are attached. When I drive the parent vehicle, the camera is zoomed and it's unplayable. I've searched for camera collision or smth like that but nope, nothing.

    Someone have an idea?

  2. Hello,

    Sorry for the double post, just to post a video of the actual state of developement who is more "clean" than the previous one.

    I also have a question and I hope you can answer me, as you can see on the video, the player (aka CJ) is very dark compared to the other elements like the road. Anyone know why or have a solution ?

    FatalTerror.

  3. getPlayerIdleTime?

    That doesn't help me enough.

    To explain a bit more, I've a client render who check the cursor position every frame. The problem is: even if I'm in another window and lost the focus, it still check for the cursor position in the MTA window. Do you understand ?

  4. Greetings,

    I wanna know if there is any way to detect if the player lost the focus with the MTA window (game). The function isMTAWindowActive returns true if we have the ESC menu active but not the game itself.

    Thanks.

  5. I guess you didn't read the topic carefully, as I said that I'm working on it, and it is un complete. Nothing from community I am using. So you better think before you post.

    Why you waste your time to create the ''same'' thing as in community? god..

    To learn? This looks useless for you, but for him it's a lot of work. Learn by doing is the best way to learn.

    Keep going Bilal ;)

  6. Hi,

    First, the function that you're trying to call seems to be undefined. You want to get the number of active players, I see also that you have a function getActivePlayers who returns an array of the active players. If you want to get the number of active players you can do like this:

    if(#getActivePlayers() <=  1)then 
    

    Second, If I understood right you want to end the map when the last player reach the Hunter. If you read the Wiki, you will see that the race gamemode gives you some usefull events like this one:

    onPlayerPickUpRacePickup     
    int/string pickupID, string pickupType, int vehicleModel 
    

    (source: https://wiki.multitheftauto.com/index.ph ... ource:Race)

    That events actives himself when a player pick up a racepickup like nitro, vehiclechange or repair.

    So, for your script, what you need to do is: when we have 1 active player, we add the event using addEventHandler per example. If the event is activated, we check if the pickup is the hunter pickup like this: if pickupType == "vehiclechange" and vehicleModel == "HUNTERID" then

    If this is right, then you can call the function RaceMode.endMap() to end the map.

    Hope that helps you.

    Regards.

  7. Yea, vector formats would be great.

    It must be possible, there are plugins for lua.

    But mta must support it too.

    Indeed, there are libraries to render SVG with Lua. But, If the MTA devs couldn't / wouldn't insert that feature on MTA, we could create a module for that, no ? Will that work ?

    I was doing some search and I found that: https://github.com/memononen/nanosvg

    What do you think guys ?

    .yuv files are great and its working fine with mtasa

    Don't know that file format but seems to be a video format? o.O

    Regards.

  8. Hello there,

    I've a question.

    There is no way to introduce the SVG format on MTA? That would be very usefull for logos, icons & other shits.

    I'm bored with that image quality that MTA gives.

    Maybe we could parse an SVG file and create the image with dx functions & bézier curves ?

    Regards.

  9. Hi,

    Didn't know some servers ban players from specifics countries.

    You can find the player country using the export function from admin panel getPlayerCountry().

    When the player joins the server, we check if his country matches with the list of banned countries. If it does, then we kick him or we ban him. As you want.

    The function is:

    countryCode = exports.admin:getPlayerCountry ( playerSource ) or "N/A" 
    

    Hope that help you.

    Regards

  10. 'elementDimension' & 'elementInterior' have to be out of function with marker and forgot the 'if' & 'then', and I solved it.
    basepfs = createMarker(238.62816, 140.98083, 1003.02344, 'cylinder', 1.0, 255, 0, 0, 150) 
    setElementDimension (basepfs, 0) 
    setElementInterior (basepfs, 3) 
      
    function sairBasePF(player) 
       if isElementWithinMarker(player, basepfs) then 
       outputChatBox("[sERVER] Você saiu da HQ da Polícia Federal", player, 0, 255, 0) 
       setElementPosition (player, x, y, z) 
       setElementInterior (player, 0) 
       end 
    end 
    addEventHandler( "onMarkerHit", basepfs, sairBasePF ) 
    

    Where is defined x,y, z? Why did you check, again if the player is on the marker since he already hit him (onMarkerHit) ?

    You should check if the element is a player before teleporting the player.

    Regards.

  11. A script is not necessarely a program, just like you can decompile your own code for whatever reasons, e.g. find out the difference between using multiple ifs and a single switch statement (C/C++) (in this case, disassemble it).

    Of course, if it's our own code you can obviously decompile it if you can but not a script under copyright that you don't have rights on it.

×
×
  • Create New...