I know the economy has to do something with math, and has to be random. Well, I have this part good so far [lua] function Economy
int1 = math.random(1,100)[/lua] If the integer is over 60 the economy is doing good. If it is under 40, the economy is doing bad. If it is 40-60 the economy is doing ok. But how do i make that affect the pay days of the jobs. And the economy changes every 10 real life minutes.
EDIT:
Also sorry if this has been asked before.
use a timer for the every 10 minutes thing. What RP are you using.
What rp am i using? I am making one. Its a serious rp, but back on task, I would like the code if you can. If you cant, thats ok.
You don't even know how to make a function..
Are you really trying to make an RP gamemode?
I do know how to create the function, thank you very much. But can you post only helpful posts like lexic?
[editline]05:25AM[/editline]
I have this so far [lua] function Economy ()
int1 = math.random(1,100)
if ( choice == 1-40 ) then
RunConsoleCommand: ( "Bad_Economy" )
ply:PrintMessage( HUD_PRINTTALK, "The economy is down!" )
if ( choice == 41-60 ) then
RunConsoleCommand: ( "Okay_Economy" )
ply:PrintMessage( HUD_PRINTTALK, "The economy is doing ok." )
if ( choice == 61-100 ) then
RunConsoleCommand: ( "Good_Economy" )
ply:PrintMessage( HUD_PRINTTALK, "The economy is doing good!" )
end
end
[/lua]
[QUOTE=FuryBlitz;23612216]I do know how to create the function, thank you very much. But can you post only helpful posts like lexic?
[editline]05:25AM[/editline]
I have this so far [lua] function Economy ()
int1 = math.random(1,100)
if ( choice == 1-40 ) then
RunConsoleCommand: ( "Bad_Economy" )
ply:PrintMessage( HUD_PRINTTALK, "The economy is down!" )
if ( choice == 41-60 ) then
RunConsoleCommand: ( "Okay_Economy" )
ply:PrintMessage( HUD_PRINTTALK, "The economy is doing ok." )
if ( choice == 61-100 ) then
RunConsoleCommand: ( "Good_Economy" )
ply:PrintMessage( HUD_PRINTTALK, "The economy is doing good!" )
end
end
[/lua][/QUOTE]
Where is choice defined? I only see int1.
And unless that's defined somewhere else, it should be local int1 = blah
Ok, when it is bad economy, I want the player to not gain as much money. Say 20% of what their usual pay is. Lets say it was DarkRP and I was citizen and it was bad economy. How would I decrease their payment?
Also what's stopping players running these commands themselves? I could just come in and type "Good_Economy" in console and get max pay?
Your syntax is totally mangled, stop RIGHT THERE with your RP gamemode and read the PIL:
[url]www.lua.org/pil[/url]
I will make it admin only later, but thank you for reminding me.
This can only be an attempt at trolling, seriously.
Noting the economy is effected by whats being bought and sold your method doesn't even slightly reflect it.
I can imagine people purposely joining your server to mess with your economy. It will be a new era of smarter minging where the minges become bankers and screw your whole gamemode up. Kind of like real life :D
[QUOTE=FuryBlitz;23612216]I do know how to create the function, thank you very much. But can you post only helpful posts like lexic?
[editline]05:25AM[/editline]
I have this so far [lua] function Economy ()
int1 = math.random(1,100)
if ( choice == 1-40 ) then
RunConsoleCommand: ( "Bad_Economy" )
ply:PrintMessage( HUD_PRINTTALK, "The economy is down!" )
if ( choice == 41-60 ) then
RunConsoleCommand: ( "Okay_Economy" )
ply:PrintMessage( HUD_PRINTTALK, "The economy is doing ok." )
if ( choice == 61-100 ) then
RunConsoleCommand: ( "Good_Economy" )
ply:PrintMessage( HUD_PRINTTALK, "The economy is doing good!" )
end
end
[/lua][/QUOTE]lol @ [lua]RunConsoleCommand>>>>:<<<< ( "" )[/lua]
Sorry, you need to Log In to post a reply to this thread.