Jump to content

[REL] GTW-RPG v3.0-beta2 + AI


Mr_Moose

Recommended Posts

Questions:

Why Theres No Turf?

Why We Need To Add Turf?

Why Don't You Build A Turf Instend Of Creating New By Our Self? And why

Why When Im Police And Trying To Arrest Some Criminal With Wanted Points But I Can't?

Why When My Car Was Warping Into My Position When I Spawning It Must Be On Last Position Of Car Or When I'm VIP It Will Warp Into My Position Cause Im VIP And Theres No Car Marking In Map System?

Why There Was A NPC In Lv? It Would Be Better If NPC Are Only Spawning In Ls And Sf Only.

Suggestions:

Event Manager

Weapon Train

Drug Farm Instead Of Buying

Hit/Bounty On The Head Of Player

Support Panel

Spawn Protection

Punishments system

Lottery System

Scores system

Pick Pocket system

Medkits

House system/Drugs, weapon, and money inventory

VIP system

Link to comment

@Deym, there's a simple answer to that question. GTW-RPG is GTW-RPG which is not a copy of c*t. Features are not limited to certain cities, you can do everything literally everywhere. You can arrest wanted criminals, just taze them with a silenced gun and hit them with your nightstick, then deliver them to jail, use the /wanted command to see what type of criminal you're dealing with, different types needs to be handled differently.

Also there's no VIP system included, if you wrote your own then you probably implemented it wrong, on the other hand you can recover your car to make it spawn at your location for just $500, that's not a big deal. I like your suggestions tho.

Link to comment

I found a two problem.

In ammunation theres no marker inside so where can i buy guns?

npc have a car? Lel whats the point of rental vehicle if i can steal one in npc no matter i take a wanted points for stealing it because wanted points is fast enough to reduce so i already steal a car from npc so the next thing should do is to get away from cops until my wanted points removed so when cops trying to arrest me and im in npc vehicle that was previously steal by me so so cops was following me and my wanted points was nearly to remove so when my wanted points was removed and he doesn't arrest me after my wanted points removed he have no choose he should go away from me and try to arrest others it wouldn't fair for law players.

Link to comment

Depending on how you enter the ammunition store you may end up in the wrong dimension and thus you won't see the marker obviously, why adding a store and waste server RAM in a location normal players can't access? Anyway the solution is simple, just download the latest version and use this included interiors resource: [download] which is a fork from the default one but with all the GTW-RPG specific interiors added as well.

Secondly, about rental vehicles vs npc cars. I'm sure you could steal a car in real life and get away with it, just change the plates, take it to a nearby garage and repaint it etc.. but you wouldn't, because it's so much easier to rent a car. And just like in real life your crime isn't forgotten, in fact. If you're getting chased by a police officer in GTW-RPG your wanted level wont reduce, because escaping the law is also a crime that counts.

The algorithm is simple but efficient, as soon a crime is committed and a law enforcer is nearby the wanted level goes up instead of down, as long a law enforcer is nearby all the small pathetic "crimes" counts as well like like hitting a mailbox, standing on the roof of someones car, slightly touching another car with your vehicle, threat another player and so on.

Link to comment
Depending on how you enter the ammunition store you may end up in the wrong dimension and thus you won't see the marker obviously, why adding a store and waste server RAM in a location normal players can't access? Anyway the solution is simple, just download the latest version and use this included interiors resource: [download] which is a fork from the default one but with all the GTW-RPG specific interiors added as well.

Secondly, about rental vehicles vs npc cars. I'm sure you could steal a car in real life and get away with it, just change the plates, take it to a nearby garage and repaint it etc.. but you wouldn't, because it's so much easier to rent a car. And just like in real life your crime isn't forgotten, in fact. If you're getting chased by a police officer in GTW-RPG your wanted level wont reduce, because escaping the law is also a crime that counts.

The algorithm is simple but efficient, as soon a crime is committed and a law enforcer is nearby the wanted level goes up instead of down, as long a law enforcer is nearby all the small pathetic "crimes" counts as well like like hitting a mailbox, standing on the roof of someones car, slightly touching another car with your vehicle, threat another player and so on.

Oh ok. Thanks for the informations..

I already redownloaded all and already re-installed but ammunation was still no markers inside.

Link to comment

News: GTW-RPG v3.0 will be released with multi language support

The new standard for translations has been set and the first example has been implemented, it's time to translate GTW-RPG into all worlds languages through a structured translation system, here's how it's supposed to work. In each resource there will be two files: s_lang.lua and c_lang.lua containing all the output text used by the resource, these are loaded before anything else and will have a layout like this:

-- Definition of default language for this resource 
r_lang = exports.GTWcore:getGTWLanguage() or "en_US" 
  
-- Language text storage for this resource 
txt = { 
    -- English/English 
    ["en_US"] = { 
        ["msg_no_spam"]     = "Do not spam commands!", 
        ["log_cmd_issuer"]  = " issued the server command: '", 
    }, 
  
    -- Swedish/Svenska 
    ["sv_SE"] = { 
        ["msg_no_spam"]     = "Kommando spam är ej tillåtet!", 
        ["log_cmd_issuer"]  = " utförde följande kommando: '", 
    }, 
} 

Now, the first thing this does is to check with GTWcore for the language specified in the settings.xml file, if that's not set then the local value is used which could be set per resource individually. Default will always be English however. The table: txt is global, txt["en_US"] holds all the English translations. Within the resource script files we're calling the translations this way:

exports.GTWtopbar:dm(txt[getElementData(source, "GTWcore.language") or r_lang]["msg_no_spam"], source, 255,0,0) 

Where getElementData(source, "GTWcore.language") holds a language defined by the user, this means that each client can choose their own language only seen by themselves. r_lang is the resource language definition gathered from GTWcore which get's it from the server settings file within GTWcore. The last brackets holds the message ID which is the same for all languages, this makes it easy to know what to translate into what. The global server language (not overriding clients choices) can be set at: GTWcore/data/settings.xml

<option name="language">en_US</option> 

Bear in mind that there's no fallback feature implemented yet, if a translation doesn't exist the message should fall back to English in a optimal implementation, the decision so far is to use a function rather than the actual table. More details will be published soon.

Link to comment
  • 2 weeks later...

i used this project and i used all commands and function until i found this not working commands and functions

- /criminal

- /endwork

- F5 For Criminal

- No ammunation and gym marker (I already downloaded all resources from this project and already started all of it)

- Jail map (Jail have only a markers and doors no floors and others "SS later"

Link to comment

Upgrade again, the first three items where added yesterday in GTWcivilians merged from GTWteam. That includes the two commands /endwork and /criminal and a GUI attached to the F5 key showing you the current job progress. That resource had in fact a lot of core features regarding teams and civilian jobs.

Ammu nation, hardware shops, gym's etc are all shops which will be merged into a shop resource within the upcoming weeks, they are all based on the same code and new additional features will be added as well.

Some missing features can be found here: https://code.404rq.com/

Link to comment

How to change the [CHIEF] color tag into red.

function useLocalChat(plr, cmd, ...) 
    local msg = table.concat({...}, " ") 
    if not validateChatInput(plr, "local", msg) then return end 
    local px,py,pz = getElementPosition(plr) 
    local nick = getPlayerName(plr) 
    local r,g,b = 255,255,0 
    local chat_str = "(LOCAL)" 
    if cmd == "r" then chat_str = "(*CB* radio)" end 
    if not getElementData(plr, "anon") then 
        displayChatBubble(chat_str..": "..firstToUpper(msg), 0, plr) 
    end 
    if getPlayerTeam(plr) then 
        if getTeamColor(getPlayerTeam(plr)) then 
            r,g,b = getTeamColor(getPlayerTeam(plr)) 
        end 
    end 
    -- (2014-11-19) Count local players 
    local sumOfLocal = 0 
    for n,v in pairs(getElementsByType("player")) do 
        if isPlayerInRangeOfPoint(v, px,py,pz, chat_range) then 
            sumOfLocal = sumOfLocal + 1 
        end 
    end 
    for n,v in pairs(getElementsByType("player")) do 
        if isPlayerInRangeOfPoint(v, px,py,pz, chat_range) then 
            local occupation = "" 
            local is_police_chief = exports.GTWpolicechief:isPoliceChief(plr) 
            if is_police_chief and getPlayerTeam(plr) and policeTeams[getTeamName(getPlayerTeam(plr))] then 
                occupation = RGBToHex(defR, defG, defB).."[CHIEF]"..RGBToHex(r,g,b) 
            end 
            local outText = RGBToHex(r,g,b)..chat_str.." "..occupation.."["..tostring(sumOfLocal).."] "..RGBToHex(r,g,b)..nick..": "..RGBToHex(defR,defG,defB) 
            local length = string.len(outText..firstToUpper(msg)) 
            if length < 128 then 
                outputToChat(outText..firstToUpper(msg), v, r,g,b, true) 
            else 
                outputToChat(outText, v, r,g,b, true) 
                outputToChat(RGBToHex(defR, defG, defB)..firstToUpper(msg), v, r,g,b, true) 
            end 
            playSoundFrontEnd(v, 11) 
        end 
    end 
  
    -- Prevent spam and log the chat 
    last_msg[plr]["local"] = msg 
    cooldownTimers[plr] = setTimer(function() end, antiSpamTime, 1) 
    if cmd == "r" then 
        outputServerLog("[CB] "..getPlayerName(plr)..": "..msg) 
    else 
        outputServerLog("[LOCAL] "..getPlayerName(plr)..": "..msg) 
    end 
end 
addCommandHandler("localchat", useLocalChat, false, false) 
addCommandHandler("local", useLocalChat, false, false) 
addCommandHandler("lc", useLocalChat, false, false) 

Link to comment

That color is a result of these three parameters: defR, defG, defB, so to make it red you just have to set defR to anything between 255 and 50 and the other two to 0. A lower value means a darker red. All those parameters are defined at the top as global.

Link to comment

I Have a Question if my group is ArmedForces and i use /army command and its work

the thing that i want to know where can i edit the ArmedForces into MilitaryForces which folder i can see it or edit it and script name?

EDIT:

How to make this into my desire time for example 350 seconds for capturing this turf

local time_to_capture = math.round((tonumber(getElementData(source, "sizex")) or 0) * (tonumber(getElementData(source, "sizey")) or 0) * time_reduce_factor, 3) 

Link to comment

Command to job ID translation for armed forces are located at: civ_c.lua at line 302 and below. Line 335 holds the actual command if you wish to change that. Bear in mind however that when you change those values you also have to update: data.lua at line 370 and 399 to match your new names and ID's.

To change the time it takes to capture a turf all you need to do is to change this:

local time_to_capture = math.round((tonumber(getElementData(source, "sizex")) or 0) * (tonumber(getElementData(source, "sizey")) or 0) * time_reduce_factor, 3) 

to this:

local time_to_capture = 60 

assuming you want 60 seconds constant time to capture

Link to comment
Command to job ID translation for armed forces are located at: civ_c.lua at line 302 and below. Line 335 holds the actual command if you wish to change that. Bear in mind however that when you change those values you also have to update: data.lua at line 370 and 399 to match your new names and ID's.

To change the time it takes to capture a turf all you need to do is to change this:

local time_to_capture = math.round((tonumber(getElementData(source, "sizex")) or 0) * (tonumber(getElementData(source, "sizey")) or 0) * time_reduce_factor, 3) 

to this:

local time_to_capture = 60 

assuming you want 60 seconds constant time to capture

Thanks for help!

Link to comment

I was goin to ammunation and the topbar says

" Ammu nation, buy your weapons and ammuniotion here, rob at ye own risk "

and i was thinking how i going to rob this ammunation theres no ped inside and theres only one cylinder to go back in dimension 0

isn't theres a GTWammunation resource like that? which is not added in GITHUB?

Link to comment

There are different resources managing different parts of the stores, some private and some public. That's why you only see some of them like notifications. GTWammunation and GTWhwshops are the two resources managing all the weapon and tools shops, the plan is to merge them all into a shop resource and include other types of shops in there as well.

Link to comment
There are different resources managing different parts of the stores, some private and some public. That's why you only see some of them like notifications. GTWammunation and GTWhwshops are the two resources managing all the weapon and tools shops, the plan is to merge them all into a shop resource and include other types of shops in there as well.

Why theres no GTWammunation and GTWhwshops in GITHUB?

Link to comment

"GTWvehicleshop"

Alright i noticed this when i shoot my vehicle it will explode now my vehicle was exploded then i pressed hide which is hide my vehicle then now i pressed spawn then my vehicle spawned so i was thinking my vehicle was already exploded but it has a health again 30% or less it must be engine off and can't drive.

Link to comment

There are reasons for that as well as many other possible solutions, first of all a blown up vehicle can't be repaired, that's why the health is restored to 30% after re-spawn. Re-spawn is also not possible during a police chase as it would be unfair for law units. Now I got three solutions for this and at least one of them is going to be implemented:

  • The more damage a vehicle get the slower it becomes (reducing performance) just like a real car down to 30% where it's so poor you can't even drive it before it's repaired
  • As you suggested, blocking controls for the driver or freeze it so that it can't be used when reaching the bottom
  • Disable explosions completely. I believe there's a function for this which by default makes the vehicle unable to drive once reaching 27-30% health without risk of explosion

Last but not least, GTWranks is now included in GTWcivilians and a lot of other optimization has been made in that area.

Link to comment
There are reasons for that as well as many other possible solutions, first of all a blown up vehicle can't be repaired, that's why the health is restored to 30% after re-spawn. Re-spawn is also not possible during a police chase as it would be unfair for law units. Now I got three solutions for this and at least one of them is going to be implemented:

  • The more damage a vehicle get the slower it becomes (reducing performance) just like a real car down to 30% where it's so poor you can't even drive it before it's repaired
  • As you suggested, blocking controls for the driver or freeze it so that it can't be used when reaching the bottom
  • Disable explosions completely. I believe there's a function for this which by default makes the vehicle unable to drive once reaching 27-30% health without risk of explosion

Last but not least, GTWranks is now included in GTWcivilians and a lot of other optimization has been made in that area.

Good Idea + Theres No Pilot Job And Taxi Job? Hahahah xD

Link to comment
  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...