Jump to content

Derby Point`s


steven1l

Recommended Posts

Posted (edited)

Hey i need help i made this script whits a tut on google. but when i installed on my server. i dont get anny error

but it dont work. Can somone help me?

function winpoints(mapInfo,mapOptions,gameOptions) 
local alivePlayers = getAlivePlayers() 
if resources == "race" then  
if #alivePlayers == 1 then  
local allAlivePlayers = getAlivePlayers() 
local player = allAlivePlayers[1] 
local playerCount = getPlayerCount() 
local pointsToWin = playerCount *5 
setElementData(player, "Points", getElementData(player, "points") + pointsToWin) 
outputChatBox (getPlayerName(player) .." #FF0000is the final survivor!! He wins " .. tostring(pointsToWin) .." points!",getRootElement(),0,255,0,true)  
end 
end 
end 
addEventHandler ("onPlayerWasted",getRootElement(),winpoints) 
addEventHandler ("onPlayerQuit",getRootElement(),winpoints) 
addEventHandler( 'onPlayerLogin', root, 
function() 
local getp = getAccountData ( getPlayerAccount ( source ), "xss.points" ) 
setElementData(source, "Points", getp) 
end 
) 
addEventHandler( 'onPlayerQuit', root, 
function() 
local setp = getElementData(source, "Points") 
setAccountData ( getPlayerAccount ( source ), "xss.points", setp ) 
end 
) 
addEventHandler("onResourceStart", 
getResourceRootElement(getThisResource()), 
function() 
exports.scoreboard:addScoreboardColumn("Points") 
end) 
  

this is not the correct way of asking for help! read this topic: viewtopic.php?f=91&t=27027 and then come back and edit your post.

yea srrry

Edited by Guest
Posted
post here the ERRORs you see at the debug script.

Or read debugging wiki page over and over again until you understand the most common errors and fix them yourself, and I prefer this solution.

Posted

If you are logged as admin you can do "/upgrade" in chat box, "upgrade" in ingame console. You can use server console to do "upgrade" too. Try doing "refreshall" (same ways as before) after. I wouldn't rely on "upgrade" anyway.

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