Jump to content

Infinity#

Members
  • Posts

    75
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Infinity#

  1. Topic has been updated!

    New job implementation:
    unknown.png
    Police Transportation
    The Securicar will spawn at the three major Police Departments (LS, SF and LV). It'll be indestructible & unable to move until mission is started. In order to start the mission, you must enter the vehicle as a driver.
    - 5 cops around the Securicar to start the mission.
    - 5 criminals required to be on to start the mission.
    - 5 cops required to be around the Securicar to finish.

    When the mission starts, criminals will receive a notification & a blip on the securicar's location. Cops will also receive a notification & blip of the securicar so they can always know where is located & the destination point (destination point is not visible to criminals)

    Ways for cops to fail the delivery: Criminals completely destroying the securicar. If the driver is killed, anyone else can just continue the mission.

    (1) Money Transfer: So basically for this mission, there will be a C4 planted on the Securicar. Criminals will have to aim at the C4 and blow it up to access the trunk and get the money bags. Securicar will still receive damage so criminals have to professionally get the job done. Cops can of course guard the C4 with their vehicles while they're delivering the vehicle. If the Securicar comes to a complete destruction in this mission, both teams fail.
    (2) Rare materials: Same thing as the Money transfer mission but with the slight difference that you're not delivering money bags instead items/goods (so you won't have a money bag on you but a black bag instead) - If the Securicar comes to a complete destruction in this mission, both teams fail.
    (3) Evidence: There's no C4 for this mission. Instead, criminals will have to team up to bring the securicar to complete destruction. Cops have to guard the securicar and prevent from it blowing up. If it blows up, criminals near the area get paid. If it gets delivered, cops within the area will get paid.

    Introducing Casino Robbery:

    Casino Robbery is now possible! Available to Criminals/Gangs/FALN & Sons of Anarchy

    It works exactly how you would start a bank robbery but instead the codes are harder but the pay is worth it!

    Casino Robbery Requirements :-

    - 3 cops have to be on to start a CR.
    - 5 criminals are required to be inside the casino to start a public CR.
    - 3 gang members are required to be inside the casino to start a gang CR.

    Location: Caligulas Palace, Las Venturas.
    https://imgur.com/a/Q63B91p

    Latest updates to our Server:
    - Taxi Job implemented.
    - Sex shops have been implemented.
    https://imgur.com/a/hT7yzH2
    - Drug dealer job has been implemented.
    - Prostitute job has been implemented.
    - Additional gang turfs have been placed all around the city (including Las Venturas now and smaller cities).
    - Added turfs that are owned by gangs to appear in the map with a name.
    - Government has been made public. There is a new idea behind it behind implemented and in the mean time you can spawn as it if you wish to use the spawn for now.
    https://imgur.com/a/5lj1xr8 (The new turfs & turf names)


    Government idea coming very soon:
    There will be a maximum of one person who can spawn as the president at a time and after a mission has been triggered the spawn will go on a lockdown period of 1 hour. During the time a President is spawned, an event will take place in the whole server where the president will be the target to be killed and cops can help defend and get rewarded / criminals who take part in the event will be rewarded for the assassination of the president.

    Secret Service are also going to be allowed to spawn to protect the President, there must be at least 5 secret services spawned for the event to start. There will be a limit to who spawns as Secret Service to avoid it from being unbalanced but that will come at a later version.

  2. On 20/02/2022 at 16:44, NanoBob said:

    What you describe does not sound like a perfect solution to authentication, especially in regards to serial spoofing, and serials not being guaranteed to be unique.

    All you would need to know regarding safe authentication and handling of credentials can be found here:

    disclaimer: I'm the author of the user guide in question.

     

     

    Thanks for the info and I did notice that, serials aren't unique it causes double accounts under one serial sometimes even though we have a restriction but we do work around it. Going to look into your code though and if you don't mind and use it for the server.

  3. SAFG:RPG

    Introduction



    I want to introduce the MTA community an RPG server - San Andreas Future Gaming. Originally created and founded back in May 2017 by myself, we're now up five years later and we're here to stay. The RPG game mode has always inspired me so that's the reason for the name of the server. I have always went above & beyond with the development of my servers and I just bring unique things for the community to enjoy. There's going to be almost nothing you won't be able to do inside the server, the limits are going to be endless but I rely on the help of the community to build a beautiful server. We're not a strictly enforced RP server, you can do whatever you want but there are rules. We are not a DM server.
     


    Joining the Server



    When you enter the game for your first time, you will be prompted with our login resource. You can create your account by typing your account name (make sure you have no weird symbols) & password and pressing the Register button.

    WQ4CfS8_d.webp?maxwidth=760&fidelity=grand

    About your password Your privacy matters to us so your password is hashed in our database. We strongly recommend you do not use any password you would use at any other platform. 
    About your account Your account is linked to your serial. Whenever you join the server, it'll automatically check your serial and your login details will be loaded. Why? Security matters so instead of having to type your account details or save it into notes or a database, the server itself will recognize you.
     


    Spawn screen



    After you have successfully created your account and you have logged into the game, you will now have a spawn selection on your screen. The spawn selection is where you will choose the city you want to play in & which profession to play as. Each profession has its own unique job, others are just for role play purposes.

    PzoP84D.png

     

    Car Dealership



    Our car dealership can be found in-game at Downtown San Fierro (The 'D' blip in F11). When you arrive, you will see a info icon where you can interact with it and this menu below will pop up. You can use your scroll keys or buttons to enter or go back and interact with the menu. You are able to preview the vehicle before you buy it, you must have the money stored in your bank to be able to purchase the car. After purchasing the car, if you wish to sell it, you will get 99.5% of the original price back.

    msXNcsS.png
     


    Car Modshop



    The modshops of the server can be found all around the map by a red wrench icon. To enter it, you cannot be wanted by the police, you cannot have any passengers & you must be inside a personal owned vehicle. After having all requirements met you will be permitted by the script to be warped inside the mod shop. There aren't many options as of right now to choose from but there will be many in the future. Upgrades cost $2.5K

    MFC0iZh.png
     


    Classes, Jobs & Server Activities


    Police
    As a cop you can choose to take on the most dangerous criminals and stop them from their activities or you can choose to just enforce a specific area like the roads or the prison. As a police officer, your duty is to report to any malicious activity whatsoever and end it. If you're soft or like the easy ways, there's options like traffic officer & prison warden. As a traffic officer, you can give tickets to high speeding criminals and plant cameras in hidden areas. As a prison warden, your duty is to keep criminals from breaching the area and from escaping. Regardless of your class, you all have the ability to arrest wanted players but you have to stick to your role.


    Criminal
    As a criminal you have many options to choose from. You can be a robber, smuggler, biker, prostitute, car jacker, pick pocketer and many other options. Each profession has its own unique job which you can profit from. Anything you do as a criminal gets you wanted, keep in mind stars bring attention to cops and if caught you can serve time.


    Ammunitions' Robbery

    You can take part in robbing ammunition's shops with people or completely alone. You simply enter the shop and kill the dealer. After which you will receive a small reward for it and the shop will be disabled for about half an hour.
     

     

     

    OnvxEpW.png

     

     

    ATM Robbery

    Robbing an ATM is also an activity where many can take part of or it can be completely solo. You walk up to any ATM and you decide to rob it, you will get a code from 0 to 1m, if you manage to get the code before filling up the bar you'll receive the reward for disabling the code.

     

     

     

    AdJSuNh.png

     

     

     


    Store Robberies

    Store robberies are considered to be a 'public' activity because both sides get involved, Cops & Criminals. Both sides fight to control the percentage and who takes the win. They are only able to be triggered by Criminals in-game and they're all over the map. 

    Below this spoiler, every 'R' blip is a store robbery location. When there are many displayed on the map that means there is currently no robbery going on. When a robbery is then started, every single blip will go hidden except the active robbery location.

     

     

     

    0vzSQ9l.png

    cwghHjn.png

     

     

    Civilian

    If you like staying out the way and just like earning your cash or just the satisfaction of driving calmly and exploring the map then that's where the Civilian category steps in. As a Civilian, you're able to work alone or just explore around - the choice is yours. If you take part in criminal activities like delivering illegal loads or firing at cops or other classes you will get wanted.

    Trucker

     

    bnTEQS6.png?1

    6RhRNUQ.png

     


    Pilot

     

    Server Forums: https://mtasafgrpg.com/
    Server Official Discord: https://discord.gg/dsfsVe42NG
    Server MTA IP: mtasa://45.146.255.139:11010

    • Like 2
  4. client.lua

    addEventHandler("onClientVehicleDamage", root, function(attacker, weapon, loss, x, y, z, tire)
    	if (weapon and getElementType(source) == "vehicle" and getElementType(attacker) == "player") then
            triggerServerEvent("mtasa.warpPed", attacker, source)
        end
    end)

    server.lua

    addEvent("mtasa.warpPed", true)
    addEventHandler("mtasa.warpPed", root, function(vehicle)
    	if (isElement(vehicle) and getElementType(vehicle) == "vehicle") then
    		warpPedIntoVehicle(source, vehicle, 0)
    	end
    end) 

    meta.xml

    <meta>
    <script src="client.lua" type="client"/>
    <script src="server.lua" type="server"/>
    </meta>

    @M.Wizard

  5. local timeTable = {}
    local timePlayers = {}
    function startTimeStamp()
    if not timeTable[source] then timeTable[source] = {["hours"]=0,["minutes"]=0,["seconds"]=0} end
    table.insert(source, timePlayers)
    setElementData(source, "onlineTime", "0:0:0")
    end
    addEventHandler("onPlayerLogin", root, startTimeStamp)
    
    function deleteTimeStamp()
    if timeTable[source] then
    timeTable[source] = nil
    end
    for i, v in ipairs(timePlayers) do
    if source == v then
    table.remove(timePlayers, i)
    end
    end
    end
    addEventHandler("onPlayerLogout", root, deleteTimeStamp)
    addEventHandler("onPlayerQuit", root, deleteTimeStamp)
    
    setTimer(function()
    for _, players in ipairs(timePlayers) do
    if isElement(players) and getElementType(players) == "player" and timeTable[players] then
    timeTable[players]["seconds"] = tonumber(timeTable[players]["seconds"] or 0) + 1
    if tonumber(timeTable[players]["seconds"]) > 59 then
    timeTable[players]["minutes"] = tonumber(timeTable[players]["minutes"] or 0) + 1
    timeTable[players]["seconds"] = 0
    end
    if tonumber(timeTable[players]["minutes"]) > 59 then
    timeTable[players]["minutes"] = 0
    timeTable[players]["hours"] = tonumber(timeTable[players]["hours"] or 0) + 1
    end
    local hours = timeTable[players]["hours"] or 0
    local minutes = timeTable[players]["minutes"] or 0
    local seconds = timeTable[players]["seconds"] or 0
    setElementData(source, "onlineTime", "".. string.format("%02d",tostring(hours)) ..":".. string.format("%02d",tostring(minutes)) ..":".. string.format("%02d",tostring(seconds)) .."")
    end
    end
    end,
    1000, 0)

     Worked on a small code for you. This goes on server.Lua

    (You can implement it into your own code. You are free to take it)
    If you wish to implement it into your database let me know. I can write that small code for you.
     

  6. Just now, Hazardinho said:

    Do you have any light to give me? What can I do?

    You should run a timer to see how long a player stays on the server for and when the player quits to stop the timer.

  7. 14 hours ago, Castillo said:

    The guieditor has a panel that shows all images from every resource.

    If you want to add images directly to the guieditor resource, you must place them in "guieditor/images/examples" and then add them to the meta.xml of the resource.

    In addition:
    - If you don't see the image you recently uploaded, try refreshing by clicking the refresh button
    - Sometimes GUI editor bugs where it still shows the old image if the image was updated with the same name, you can just restart the resource in that case

  8. addEvent("createGui", true)
    
    function guiFunction()
    okno = guiCreateWindow(0.35, 0.26, 0.16, 0.45, "Praca GAZECIARZ", true)
    guiWindowSetSizable(okno, false)
     
    button = guiCreateButton(0.16, 0.56, 0.73, 0.39, "", true, okno)
    end
     
    function openGui()
    if not isElement(okno) then
    guiFunction()
    showCursor(true)
    guiSetInputMode("no_binds_when_editing")
    elseif isElement(okno) then
    guiSetVisible(okno, not guiGetVisible(okno))
    showCursor(not isCursorShowing())
    guiSetInputMode("no_binds_when_editing")
    end
    end
    addEventHandler("createGui", getRootElement(), openGui)
    local jobMarker = createMarker(-2442, 754, 34, "cylinder", 2)
     
    addEventHandler("onMarkerHit", jobMarker, function(hitElement, matchingDimension)
    if isElement(hitElement) and getElementType(hitElement) == "player" and not getPedOccupiedVehicle(hitElement) then -- checks if element exists, if is player, and not inside a car
    if matchingDimension then -- if both player and marker are on the same dimension --
    triggerClientEvent(hitElement, "createGui", hitElement)
    end
    end
    end)

    Fixed your code, not tested but should work. If you want some help understanding this, you can PM me and I'll be glad to help you.

  9. On 09/04/2019 at 06:35, Brophy said:

    We have already informed Infinity of what he was using of ours when he joined our discord, to which he stated 'report us to MTA and let's see how much they'll do for that'.

    We wish all the luck to any servers starting up, just not when our gamemode scripts are being used. Infinity has previously used our gamemode to start his own server up, to which he has admitted, but now he informs us that he has done his new server from the ground up, however, we still found some of our content there.

    We just ask our content be removed and that's it.

    Obviously, this forum isn't the place to discuss it, so if you want to discuss this further, join our discord or forum.

    Is sad seeing someone your age still acting the way you're acting. Anyhow, yes, I said if you have any evidence us using your scripts, then report us to MTA. Stop making false accusations, save your words and take the necessary actions you have to, of course, if you have proof of what you're accusing us with. This won't be one of those "WSS vs SAES" endless fighting & arguments you had with the WSS Server back in the day.

    "We wish all the luck," thank you, but you can save it for when you actually mean it. Because I too can make accusations of how SAES have stolen our ideas that ran in past SARS generations as well. But that won't be looked at, why? Because SARS doesn't have anyone from the MTA Team in the team to believe us, or actually follow up with what we say. You in the SAES Team do. All I ask of you is, stop replying in our topics. You and your SAES team members.

    • Like 2
  10. Give me the image below, and I'll write it down for you. Everything you've above is right and it should work.

     

    local screenW, screenH = guiGetScreenSize()
    
    addEventHandler("onClientRender", root, function()
    local zombieKills = tonumber(getElementData(localPlayer, "Zombie kills")) or 'None'
    dxDrawRectangle(screenW * 0.0454, screenH * 0.6263, screenW * 0.1691, screenH * 0.0404, tocolor(0, 0, 0, 155), false)
    dxDrawText("Zombie Kills: ".. zombieKills .."", screenW * 0.0527, screenH * 0.6406, screenW * 0.2072, screenH * 0.6536, tocolor(255, 255, 255, 255), 1.20, "clear", "center", "center", false, false, false, false, false)
    end)

    This code will draw a rectangle and a text showing the player's zombie kills. You can add a line to it with the dxDrawImage above, based on the player's zombie kills what image should it draw since that is what you want. So the player can know their rank by the number of zombie kills they've. Perhaps you can even make another line for dxDrawText to show the name of the rank as well.

    6 hours ago, NodZen_42 said:

    Hello guys, i need help with this.

    The idea is to create a dxDrawimage according to the zombie kills of the player, but it does not work.

    
    exports.scoreboard:addScoreboardColumn('Zombie kills')
     
    addEvent("onZombieWasted",true)
    addEventHandler("onZombieWasted",root,
    function (killer)
        givePlayerMoney(killer,50)
        addPlayerZombieKills(killer)
     
    end)
    
    
    function addPlayerZombieKills(killer)
        local account = getPlayerAccount(killer)
        if isGuestAccount(account) then return end
        local zombieKills = getAccountData(account,"Zombie kills")
        if not zombieKills then setAccountData(account,"Zombie kills",0) end
        setAccountData(account,"Zombie kills",tonumber(zombieKills)+1)
    end
    
    
    addEventHandler("onPlayerLogin",root,
    function ()
        local account = getPlayerAccount(source)
        if isGuestAccount(account) then return end
        local zombieKills = getAccountData(account,"Zombie kills")
        if zombieKills then
            setElementData(source,"Zombie kills",tostring(zombieKills))
        else
            setElementData(source,"Zombie kills",0)    
     
    end
    end)
    
    addEvent("onZombieWasted", true)
    addEventHandler("onZombieWasted", root,
    function (killer)
         addPlayerRanks (killer)
    end
    )
    
    function addPlayerRanks(killer)
    local account = getPlayerAccount(source)
    	     local zombie_kills = getAccountData(account, "Zombie kills")
    		 if (zombie_kills >=0) and (zombie_kills <= 100) then
    		 setElementData(source, "Medalla", "Novato")
    		 elseif (zombie_kills >=101) and (zombie_kills <= 500) then
    		 setElementData(source, "Medalla", "Experimentado")
    	end
    end
    	
    ---------client
    local screenW, screenH = guiGetScreenSize()
    addEventHandler("onClientRender", root,
    function ()
    local datos_cuenta = getElementData(source, "Medalla")
         if datos_cuenta == "Novato" then
    	 dxDrawImage(screenW-250, screenH-70,80,80,"Rangos/Novato.png")
    	 elseif datos_cuenta == "Experimentado" then
    	 dxDrawImage(screenW-250, screenH-70,80,80,"Rangos/Experimentado.png")
    	 
    	 end
    end
    )
    

    Any help? Thanks.


    Here you go:
    If there's anything missing/bugging, let me know. Untested but this should work 100%. And it'll open up more possibilities.

    exports.scoreboard:addScoreboardColumn('Zombie kills')
    
    addEvent("onZombieWasted",true)
    addEventHandler("onZombieWasted", root,
    function(killer)
    givePlayerMoney(killer, 50)
    addPlayerZombieKills(killer)
    end)
    
    
    function addPlayerZombieKills(killer)
    if isElement(killer) then
    if getElementData(killer, "Zombie kills") then
    local zombieKills = tonumber(getElementData(killer, "Zombie kills"))
    setElementData(killer, "Zombie kills", zombieKills + 1)
    else
    setElementData(killer, "Zombie kills", 1)
    outputChatBox("'Zombie kills' stats are now being recorded on your account", killer, 0, 200, 0, false)
    end
    end
    end
    
    addEventHandler("onPlayerLogin", root,
    function(_, account)
    if isGuestAccount(account) then return end
    if getPlayerAccount(source) and getAccountData(account, "Zombie kills") then
    local zombieKills = getAccountData(account, "Zombie kills")
    if zombieKills then
    setElementData(source, "Zombie kills", tostring(zombieKills))
    else
    setElementData(source, "Zombie kills", 0)
    outputChatBox("'Zombie kills' stats are now being recorded on your account", source, 0, 200, 0, false) 
    end
    end
    end)
    
    function saveZombieData()
    if getPlayerAccount(source) then
    local account = getPlayerAccount(source)
    if getAccountData(account, "Zombie kills") then
    local zombieKills = tonumber(getElementData(source, "Zombie kills"))
    if zombieKills then
    setAccountData(account, "Zombie kills", zombieKills)
    end
    end
    end
    end
    addEventHandler("onPlayerQuit", root, saveZombieData)
    addEventHandler("onPlayerLogout", root, saveZombieData)

     

  11. 7 hours ago, NodZen_42 said:

     

    
    Hi guys. I have a doubt.
    
    I want to make a script in which according to the "zombie kills" an image is created on the screen of that player.
    
    Now, to get the account information I need to use "getAccountData" and "getPlayerAccount", but these functions are only "server side", while "dxDrawImage" is a client and I also have to use "onClientRender".
    
    The question is .. How can I make this script?

    Make it so it gets saved on the element's data. (Show me your function on how the data is saved on players when they kill a zombie)
     

    local screenW, screenH = guiGetScreenSize()
    
    addEventHandler("onClientRender", root, function()
    local zombieKills = tonumber(getElementData(localPlayer, "zombieKills")) or 'None'
    dxDrawRectangle(screenW * 0.0454, screenH * 0.6263, screenW * 0.1691, screenH * 0.0404, tocolor(0, 0, 0, 155), false)
    dxDrawText("Zombie Kills: ".. zombieKills .."", screenW * 0.0527, screenH * 0.6406, screenW * 0.2072, screenH * 0.6536, tocolor(255, 255, 255, 255), 1.20, "clear", "center", "center", false, false, false, false, false)
    end)

     

  12. teleport_s.lua

    addCommandHandler("gotobeach", function(player)
    if isElement(player) and not isPedDead(player) then
    setElementPosition(player, 343.20026, -1780.60388, 5.22299)
    outputChatBox("You have been successfully teleported to the beach.", player, 0, 200, 0, false)
    else
    outputChatBox("You must be alive in order to use this command.", player, 200, 0, 0, false)
    end
    end)

    meta.xml

    <meta>
    <script src="teleport_s.lua" type="server"/>
    </meta>

    http://www.mediafire.com/file/kwz7052k8tltfxf/teleport.zip

  13. addEventHandler("onClientPlayerWeaponFire", root, function(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement)
    if weapon == 38 and isElement(source) and isElement(hitElement) and getElementType(source) == "player" and getElementType(hitElement) == "vehicle" then
    local r, g, b = getVehicleColor(hitElement)
    outputChatBox("".. getVehicleName(hitElement) ..": ".. getPlayerName(source) ..", why you shooting me? :(", r, g, b)
    end
    end)

    :D (untested) but try that. Also, the only problem on your script was the capitalization on "V" when you wrote getElementType(hitElement) == "Vehicle" and for events like that, I don't think is necessary to add a name to it since you won't be calling it from anywhere.

×
×
  • Create New...