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

you are using function from race resource..

are you modifying race resource or creating new one?

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

i wasnt asking if you are using this function, but if you are modifying race resource or creating new one.. you cant access function from race in another resource.

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

...

answer my question or you won't get help :/

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

And how about this?

https://wiki.multitheftauto.com/wiki/Debugging

Saw this before? I'm pretty sure you can spot an error easly with debugging.

Note: To debug NOT means to enter "debugscript 3" in console - it's something more (generally it is watching actions and variables with outputDebugString)

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

post here the ERRORs you see at the debug script.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

if says its outdated then type /upgrade

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

some resources is getting damaged after doing upgrade..

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

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.

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

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