bandi94 Posted June 29, 2011 Posted June 29, 2011 i have this script its not 100% made by me i just aded some functions like login points to 0 and ... and only for some players is working the tab menu section (for some players shows the points for another players is not showing ) the srcipt had this problem befor i edit it . can somedoy make a new tab section or something i tryed couple times but i failed meta server side, gived admin rights for sript call(getResourceFromName("scoreboard"),"addScoreboardColumn","Total Win's") function vehicleDetector(pickupID, pickupType, vehicleModel) if pickupType == "vehiclechange" and vehicleModel == 425 then if getPlayerAccount(source) and not isGuestAccount(getPlayerAccount(source)) then increaseAccountData(source) outputChatBox("*HUNTER ALERT: "..getPlayerName(source).." has found the Hunter and get +1 win!",getRootElement(),25,125,225, true) else outputChatBox("*HUNTER ALERT: "..getPlayerName(source).." has found the Hunter, but wasn't logged in, login or register!",getRootElement(),25,125,225, true) end end end addEventHandler("onPlayerPickUpRacePickup",getRootElement(),vehicleDetector) function increaseAccountData(player) if not player then return end local account = getPlayerAccount(player) if not account or isGuestAccount(account) then return end local accountData = getAccountData(account,"hunterPoints") if not accountData then setAccountData(account,"hunterPoints",1) else setAccountData(account,"hunterPoints",tonumber(accountData)+1) end end function updateScoreboardTotalWins() for i,v in pairs(getElementsByType("player")) do local account = getPlayerAccount(v) if not account or isGuestAccount(account) then setElementData(v,"Total Win's","Login!") return end local point = getAccountData(account,"hunterPoints") if not point then setElementData(v,"Total Win's","0") return end setElementData(v,"Total Win's",tonumber(point)) end end setTimer(updateScoreboardTotalWins,1000,0) Ingame Name : |DGT|Puma DGT Clan Server 24/7 Owner/Scripter MultiGameMode in progress :
bandi94 Posted June 29, 2011 Author Posted June 29, 2011 nobody have any idea ? Ingame Name : |DGT|Puma DGT Clan Server 24/7 Owner/Scripter MultiGameMode in progress :
NinetyNine Posted June 30, 2011 Posted June 30, 2011 addEventHandler("onResourceStart",getResourceRootElement(getThisResource()), function() exports.scoreboard:addScoreboardColumn("Total Win's") end) addEventHandler("onPlayerPickUpRacePickup",getRootElement(), function(pickupID, pickupType, vehicleModel) if pickupType == "vehiclechange" and vehicleModel == 425 then if getPlayerAccount(source) and not isGuestAccount(getPlayerAccount(source)) then increaseAccountData(source) outputChatBox("*HUNTER ALERT: "..getPlayerName(source).." has found the Hunter and get +1 win!",getRootElement(),25,125,225, true) else outputChatBox("*HUNTER ALERT: "..getPlayerName(source).." has found the Hunter, but wasn't logged in, login or register!",getRootElement(),25,125,225, true) end end end) function increaseAccountData(player) local account = getPlayerAccount(player) local accountData = getAccountData(account,"hunterPoints") if not accountData then setAccountData(account,"hunterPoints",1) setElementData(player,"Total Win's",1) else setAccountData(account,"hunterPoints",tonumber(accountData)+1) setElementData(player,"Total Win's",tonumber(accountData)+1) end end addEventHandler("onPlayerLogin",getRootElement(), function() local account = getPlayerAccount(source) local points = getAccountData(account,"hunterPoints") if not points then setElementData(source,"Total Win's",0) else setElementData(source,"Total Win's",points) end end) Try, its kinda morning here maybe i made something wrong
bandi94 Posted June 30, 2011 Author Posted June 30, 2011 thx but this not update the table show points only when a player join and thas all not update .. but i will try it Ingame Name : |DGT|Puma DGT Clan Server 24/7 Owner/Scripter MultiGameMode in progress :
Twisted Posted June 30, 2011 Posted June 30, 2011 i have this script its not 100% made by me i just aded some functions like login points to 0 and ... and only for some players is working the tab menu section (for some players shows the points for another players is not showing ) the srcipt had this problem befor i edit it . can somedoy make a new tab section or something i tryed couple times but i failed meta server side, gived admin rights for sript call(getResourceFromName("scoreboard"),"addScoreboardColumn","Total Win's") function vehicleDetector(pickupID, pickupType, vehicleModel) if pickupType == "vehiclechange" and vehicleModel == 425 then if getPlayerAccount(source) and not isGuestAccount(getPlayerAccount(source)) then increaseAccountData(source) outputChatBox("*HUNTER ALERT: "..getPlayerName(source).." has found the Hunter and get +1 win!",getRootElement(),25,125,225, true) else outputChatBox("*HUNTER ALERT: "..getPlayerName(source).." has found the Hunter, but wasn't logged in, login or register!",getRootElement(),25,125,225, true) end end end addEventHandler("onPlayerPickUpRacePickup",getRootElement(),vehicleDetector) function increaseAccountData(player) if not player then return end local account = getPlayerAccount(player) if not account or isGuestAccount(account) then return end local accountData = getAccountData(account,"hunterPoints") if not accountData then setAccountData(account,"hunterPoints",1) else setAccountData(account,"hunterPoints",tonumber(accountData)+1) end end function updateScoreboardTotalWins() for i,v in pairs(getElementsByType("player")) do local account = getPlayerAccount(v) if not account or isGuestAccount(account) then setElementData(v,"Total Win's","Login!") return end local point = getAccountData(account,"hunterPoints") if not point then setElementData(v,"Total Win's","0") return end setElementData(v,"Total Win's",tonumber(point)) end end setTimer(updateScoreboardTotalWins,1000,0) Make it yourself? why steal scripts? start learning here https://wiki.multitheftauto.com/wiki/Main_Page
bandi94 Posted June 30, 2011 Author Posted June 30, 2011 1 i don't steal it i ask a scripter to make this to me 2 dont say " steal" for me noob i don't say form where i have it i hate ussers like you they not know what it is on a post but they spam like idiots 3 i think this forum is for help ussers who whant to help me they help me ussers like you whit your spam (go and STFU) Ingame Name : |DGT|Puma DGT Clan Server 24/7 Owner/Scripter MultiGameMode in progress :
Castillo Posted June 30, 2011 Posted June 30, 2011 i have this script its not 100% made by me i just aded some functions like login points to 0 and ... and only for some players is working the tab menu section (for some players shows the points for another players is not showing ) the srcipt had this problem befor i edit it . can somedoy make a new tab section or something i tryed couple times but i failed meta server side, gived admin rights for sript call(getResourceFromName("scoreboard"),"addScoreboardColumn","Total Win's") function vehicleDetector(pickupID, pickupType, vehicleModel) if pickupType == "vehiclechange" and vehicleModel == 425 then if getPlayerAccount(source) and not isGuestAccount(getPlayerAccount(source)) then increaseAccountData(source) outputChatBox("*HUNTER ALERT: "..getPlayerName(source).." has found the Hunter and get +1 win!",getRootElement(),25,125,225, true) else outputChatBox("*HUNTER ALERT: "..getPlayerName(source).." has found the Hunter, but wasn't logged in, login or register!",getRootElement(),25,125,225, true) end end end addEventHandler("onPlayerPickUpRacePickup",getRootElement(),vehicleDetector) function increaseAccountData(player) if not player then return end local account = getPlayerAccount(player) if not account or isGuestAccount(account) then return end local accountData = getAccountData(account,"hunterPoints") if not accountData then setAccountData(account,"hunterPoints",1) else setAccountData(account,"hunterPoints",tonumber(accountData)+1) end end function updateScoreboardTotalWins() for i,v in pairs(getElementsByType("player")) do local account = getPlayerAccount(v) if not account or isGuestAccount(account) then setElementData(v,"Total Win's","Login!") return end local point = getAccountData(account,"hunterPoints") if not point then setElementData(v,"Total Win's","0") return end setElementData(v,"Total Win's",tonumber(point)) end end setTimer(updateScoreboardTotalWins,1000,0) Make it yourself? why steal scripts? start learning here https://wiki.multitheftauto.com/wiki/Main_Page He didn't stole it this time... I made it for him in another topic San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Twisted Posted June 30, 2011 Posted June 30, 2011 i have this script its not 100% made by me i just aded some functions like login points to 0 and ... and only for some players is working the tab menu section (for some players shows the points for another players is not showing ) the srcipt had this problem befor i edit it . can somedoy make a new tab section or something i tryed couple times but i failed meta server side, gived admin rights for sript call(getResourceFromName("scoreboard"),"addScoreboardColumn","Total Win's") function vehicleDetector(pickupID, pickupType, vehicleModel) if pickupType == "vehiclechange" and vehicleModel == 425 then if getPlayerAccount(source) and not isGuestAccount(getPlayerAccount(source)) then increaseAccountData(source) outputChatBox("*HUNTER ALERT: "..getPlayerName(source).." has found the Hunter and get +1 win!",getRootElement(),25,125,225, true) else outputChatBox("*HUNTER ALERT: "..getPlayerName(source).." has found the Hunter, but wasn't logged in, login or register!",getRootElement(),25,125,225, true) end end end addEventHandler("onPlayerPickUpRacePickup",getRootElement(),vehicleDetector) function increaseAccountData(player) if not player then return end local account = getPlayerAccount(player) if not account or isGuestAccount(account) then return end local accountData = getAccountData(account,"hunterPoints") if not accountData then setAccountData(account,"hunterPoints",1) else setAccountData(account,"hunterPoints",tonumber(accountData)+1) end end function updateScoreboardTotalWins() for i,v in pairs(getElementsByType("player")) do local account = getPlayerAccount(v) if not account or isGuestAccount(account) then setElementData(v,"Total Win's","Login!") return end local point = getAccountData(account,"hunterPoints") if not point then setElementData(v,"Total Win's","0") return end setElementData(v,"Total Win's",tonumber(point)) end end setTimer(updateScoreboardTotalWins,1000,0) Make it yourself? why steal scripts? start learning here https://wiki.multitheftauto.com/wiki/Main_Page He didn't stole it this time... I made it for him in another topic ah sorry castillo didnt relize just u know he mentions not 100% made by him:P
Castillo Posted June 30, 2011 Posted June 30, 2011 Yeah, I made 99%, the 1% is the idea? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
bandi94 Posted July 2, 2011 Author Posted July 2, 2011 fixed verison i edit the scoerboard funtion now its working it gets some bugs whit showing for some players login! but if they login the points are showed ! call(getResourceFromName("scoreboard"),"addScoreboardColumn","Total Win's") function vehicleDetector(pickupID, pickupType, vehicleModel) if pickupType == "vehiclechange" and vehicleModel == 425 then if getPlayerAccount(source) and not isGuestAccount(getPlayerAccount(source)) then increaseAccountData(source) outputChatBox("*HUNTER ALERT: "..getPlayerName(source).." has found the Hunter and get +1 win!",getRootElement(),25,125,225, true) else outputChatBox("*HUNTER ALERT: "..getPlayerName(source).." has found the Hunter, but wasn't logged in, login or register!",getRootElement(),25,125,225, true) end end end addEventHandler("onPlayerPickUpRacePickup",getRootElement(),vehicleDetector) function increaseAccountData(player) local account = getPlayerAccount(player) if not account or isGuestAccount(account) then return end local accountData = getAccountData(account,"hunterPoints") if not accountData then setAccountData(account,"hunterPoints",1) else setAccountData(account,"hunterPoints",tonumber(accountData)+1) end end function tablazat() for i,v in pairs(getElementsByType("player")) do local account=getPlayerAccount(v) local point = getAccountData(account,"hunterPoints") if isGuestAccount(account) or not account then setElementData(v,"Total Win's","Login!") elseif not point then setElementData(v,"Total Win's",0) else setElementData(v,"Total Win's",point) end end end setTimer(tablazat,1000,0) Ingame Name : |DGT|Puma DGT Clan Server 24/7 Owner/Scripter MultiGameMode in progress :
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