Jump to content

willing to pay £2 pound scripter needed


battle309

Recommended Posts

im making a sumo server

i need to finish it to open it to public

i need time alive on scoreboard

when you win, you win $22000

to win you must last 5 minutes

without dieing you die and your time resets

and start counting backup to 5 minutes again

when you the person wins 22000 load another race map

people that loose get 500 for good effort

this image is an example of what im looking for where its says "score" thats the time counting up to five mins

1aseM

Edited by Guest
Link to comment

I just need a way for the game to end by someone winning e.g

i last for 5 mins without dieing so i win 22000 and the map changes to another map loosers win 500 for good effort

i need the time counting up so players know whos wining

if anyone want skype is richard.duberry

Link to comment

ok ill try make it clearer

i dont want a new scoreboard listen people

i want score in this picture to be made e.g. (i hold TAB button and i see players scores)

1aJ3C

when i press tab and see scores, the scores needs to be how long a player has been alive for.

e.g if a player has lived for 3 minutes the score will be 300, if that player dies score is reset to 0, to win you must reach 500

= 5 mins if they win they win 22000 and popup says you are the Winner ! once they have won map changes to another race map.

Link to comment

keep ur pocket change....

local time = {} 
local timerInc = setTimer(incTimes,1000,0) 
local scoreboardName = "score" -- not sure what ur scoreboard column name is.. 
  
  
function playerSpawned() 
  
    time[source] = 0 
end 
addEventHandler("onPlayerSpawn",root,playerSpawned) 
  
  
function incTimes() 
  
    for k,v in ipairs(getElementsByType("player")) do 
        time[v] = time[v] + 1000 
        setElementData(v,scoreboardName,tostring(time[v] / 600)) 
        if time[v] > 300000 then 
            killTimer(timerInc) 
            payPlayers(v) 
            --if u dont want people to draw, u will need to break the loop here 
        end 
    end 
end 
  
  
function playerQuit() 
  
    time[source] = nil 
end 
addEventHandler("onPlayerQuit",root,playerQuit) 
  
  
function payPlayers(winner) 
  
    givePlayerMoney(winner,22000) 
    outputChatBox(getPlayerName(winner) .. " Wins $22000!!!",root,0,255,0) 
    for k,v in ipairs(getElementsByType("player")) do 
        if v ~= winner then  
            givePlayerMoney(winner,500) 
        end 
    end 
    startNewMap() 
end 
  
function startNewMap() 
  
    -- i dont use race resource so... add what u need here to start a new map 
end 

this should get u started... i dont use race resource so i dont know how u normally start new maps...

i'll let u figure that part out, also i dont know if u already have the scoreboard column already added.. u didnt say :)

sorry i dont have time to test this script... ive just woke up and have to

go to work soon. post any errors and im sure i or someone else can help u out.

probably best not to insult people again with ur pocket change. :roll:

Link to comment

i tryed it and got bad arguements

exports [ "scoreboard" ]:addScoreboardColumn ( "Money", 3 ) -- Add the "Money" column to the scoreboard. 
  
 exports [ "scoreboard" ]:addScoreboardColumn ( "TimeAlive", 4 ) -- Add the "Time to the Scoreboard" column to the scoreboard. 
  
local time = {} 
local timerInc = setTimer(incTimes,1000,0) 
local scoreboardName = "scoreboard" -- scoreboard column name is.. 
  
  
function playerSpawned() 
  
    time[source] = 0 
end 
addEventHandler("onPlayerSpawn",root,playerSpawned) 
  
  
function incTimes() 
  
    for k,v in ipairs(getElementsByType("player")) do 
        time[v] = time[v] + 1000 
        setElementData(v,scoreboardName,tostring(time[v] / 600)) 
    end 
end 

Link to comment

You will get errors if u didnt add a function on start to set the players timers to 0

just add a simple loop like this:

 function startGameTimer() 
  for k,v in ipairs(getElementsByType("player")) do 
    time[v] = 0 
  end 
end 
addEventHandler( "onResourceStart", getResourceRootElement(getThisResource()), startGameTimer) 

also i see u changed the 'Score' to 'TimeAlive' so make sure u update the variable name

If u still get errors, post ur error msgs from debug along with the relevant lines in the script so we can help u fix it.

Link to comment
You will get errors if u didnt add a function on start to set the players timers to 0

just add a simple loop like this:

 function startGameTimer() 
  for k,v in ipairs(getElementsByType("player")) do 
    time[v] = 0 
  end 
end 
addEventHandler( "onResourceStart", getResourceRootElement(getThisResource()), startGameTimer) 

also i see u changed the 'Score' to 'TimeAlive' so make sure u update the variable name

If u still get errors, post ur error msgs from debug along with the relevant lines in the script so we can help u fix it.

Link to comment

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...