EvoGT Posted March 24, 2013 Share Posted March 24, 2013 Tell me something now... function onPlayerDeadInRace() local thePlayer = source local dPlayers = getDeadRacePlayers() local aPlayers = getAliveRacePlayers() local Position = aPlayers + 1 if dPlayers + aPlayers >= 2 then local cashForPlayer = math.floor((120/Position)*(dPlayers + aPlayers)) local pointsForPlayer = math.floor((30/Position)*(dPlayers + aPlayers)) givePlayerMoney(thePlayer,cashForPlayer) setElementData(thePlayer,"Points",tonumber(getElementData(thePlayer,"Points"))+pointsForPlayer) if Position == 1 then outputChatBox ("#abcdef* [WIN] 1st! You got #FFFFFF" .. pointsForPlayer .." #FFFFFFpoints #abcdefand #FFFFFF" .. cashForPlayer .."$",thePlayer,255,255,255,true) setElementData(thePlayer,"Wins",tonumber(getElementData(thePlayer,"Wins"))+1) if LastWinners[1] == "" then if LastWinners[2] == "" then if LastWinners[3] == "" then if LastWinners[4] == "" then if LastWinners[5] == "" then LastWinners[5] = thePlayer else LastWinners[4] = thePlayer end else LastWinners[3] = thePlayer end else LastWinners[2] = thePlayer end else LastWinners[1] = thePlayer end else LastWinners[5] = LastWinners[4] LastWinners[4] = LastWinners[3] LastWinners[3] = LastWinners[2] LastWinners[2] = LastWinners[1] LastWinners[1] = thePlayer end else outputChatBox ("#abcdef* [PRIZE] You got #FFFFFF" .. pointsForPlayer .." #FFFFFFpoints #abcdefand #FFFFFF" .. cashForPlayer .."$",thePlayer,255,255,255,true) setElementData(thePlayer,"Deaths",tonumber(getElementData(thePlayer,"Deaths"))+1) end else outputChatBox("#8bbae9* Minimum 2 players to get stats and cash!",thePlayer,255,255,255,true) end end This is from resource : https://community.multitheftauto.com/in ... ls&id=6623 And its making me mad ! When i and my brother test this script on local server, with 2 PC's everything works !wins updating and player who die last wins. When i test it in my server witch running fedora 13 . With 2 PC's it bugs... The player cant win.. When the last player dieds it writes not "[WIN] 1st! You got..." but "[PRIZE] You got...." Why?? on local everything works perfectly Link to comment
EstrategiaGTA Posted March 24, 2013 Share Posted March 24, 2013 We don't give support to scripts that aren't yours. You should contact with Norbinarius or make your own script (we can help you). And is WORKS, not WORDS. Link to comment
EvoGT Posted March 24, 2013 Author Share Posted March 24, 2013 We don't give support to scripts that aren't yours. You should contact with Norbinarius or make your own script (we can help you).And is WORKS, not WORDS. Ok i will try but i am not strong in scripting. But willing that MTA community will help. I wanna keep this function ( ( i want to keep this function bec i can replace this with that witch dont work ) setElementData(thePlayer,"Wins",tonumber(getElementData(thePlayer,"Wins"))+1) Lets try : X local alivePlayers = getAlivePlayers( ) if (#alivePlayers == 1) then setElementData(thePlayer,"Wins",tonumber(getElementData(thePlayer,"Wins"))+1) outputChatBox ( "The player " .. getPlayerName( alivePlayers[1] ) .. " wins!", root, 255, 255, 255, true ) Dont lol ! Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now