Jump to content

VegasBoy

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by VegasBoy

  1. VegasBoy

    Scoreboard

    Hello guys, I have a problem ,personally i like original scripts not from community , so i want to make a scoreboard , functional ofcourse , i already added "Online time " how i could do to make it bigger with more columns , shall i copy this "call ( getResourceFromName ( "scoreboard" ), "scoreboardAddColumn", "Online" ) " and add it down here .My script looks like. And yeah i can't figure out how i could make a functional scoreboard like i did for " online time" i want to add FPS, Money etc , could someone help me? addEventHandler("onResourceStart",getResourceRootElement(getThisResource)) call ( getResourceFromName ( "scoreboard" ), "scoreboardAddColumn", "Online" ) addEventHandler ( "onResourceStart" , resourceRoot , function ( ) for index , player in ipairs ( getElementsByType ( "player" ) ) do local pAccount = getPlayerAccount ( player ) if not isGuestAccount ( pAccount ) then local minutes = getAccountData ( pAccount , "Online.minutes" ) if minutes then local hours = getAccountData ( pAccount , "Online.hours" ) if # tostring ( minutes ) == 1 then minutes = "0" .. minutes end if # tostring ( hours ) == 1 then hours = "0" .. hours end setElementData ( player , "Online" , hours .. " H " .. minutes .. " M" ) local timer = setTimer ( updatePlayerOnline , 60000 , 1 , player ) setElementData ( player , "Online.timer" , timer ) else setAccountData ( pAccount , "Online.minutes" , 0 ) setAccountData ( pAccount , "Online.hours" , 0 ) setElementData ( player , "Online" , "00 H 00 M" ) local timer = setTimer ( updatePlayerOnline , 60000 , 1 , player ) setElementData ( player , "Online.timer" , timer ) end else setElementData ( player , "Online" , "N/A" ) end end end ) addEventHandler ( "onResourceStop" , resourceRoot , function ( ) for index , player in ipairs ( getElementsByType ( "player" ) ) do local pAccount = getPlayerAccount ( player ) if not isGuestAccount ( pAccount ) then local timer = getElementData ( player , "Online.timer" ) if isTimer ( timer ) then killTimer ( timer ) end end end end ) addEventHandler ( "onPlayerLogin" , root , function ( _ , pAccount ) local minutes = getAccountData ( pAccount , "Online.minutes" ) if minutes then local hours = getAccountData ( pAccount , "Online.hours" ) if # tostring ( minutes ) == 1 then minutes = "0" .. minutes end if # tostring ( hours ) == 1 then hours = "0" .. hours end setElementData ( source , "Online" , hours .. " H " .. minutes .. " M" ) local timer = setTimer ( updatePlayerOnline , 60000 , 1 , source ) setElementData ( source , "Online.timer" , timer ) else setAccountData ( pAccount , "Online.minutes" , 0 ) setAccountData ( pAccount , "Online.hours" , 0 ) setElementData ( source , "Online" , "00 H 00 M" ) local timer = setTimer ( updatePlayerOnline , 60000 , 1 , source ) setElementData ( source , "Online.timer" , timer ) end end ) addEventHandler ( "onPlayerLogout" , root , function ( pAccount ) local timer = getElementData ( source , "Online.timer" ) if isTimer ( timer ) then killTimer ( timer ) end end ) addEventHandler ( "onPlayerJoin" , root , function ( ) setElementData ( source , "Online" , "N/A" ) end ) addEventHandler ( "onPlayerQuit" , root , function ( ) local pAccount = getPlayerAccount ( source ) if not isGuestAccount ( pAccount ) then local timer = getElementData ( source , "Online.timer" ) if isTimer ( timer ) then killTimer ( timer ) end end end ) function updatePlayerOnline ( player ) local pAccount = getPlayerAccount ( player ) local minutes = getAccountData ( pAccount , "Online.minutes" ) local hours = getAccountData ( pAccount , "Online.hours" ) minutes = tostring ( tonumber ( minutes ) + 1 ) if minutes == "60" then hours = tostring ( tonumber ( hours ) + 1 ) minutes = "00" end setAccountData ( pAccount , "Online.minutes" , tonumber ( minutes ) ) setAccountData ( pAccount , "Online.hours" , tonumber ( hours ) ) if # tostring ( minutes ) == 1 then minutes = "0" .. minutes end if # tostring ( hours ) == 1 then hours = "0" .. hours end setElementData ( player , "Online" , hours .. " H " .. minutes .. " M" ) local timer = setTimer ( updatePlayerOnline , 60000 , 1 , player ) setElementData ( player , "Online.timer" , timer ) end
  2. Hello guys i have a Destruction Derby and i need some resources ...I didn;t found them on internet or Mta Community .It about the Scoreboard with Kill Deaths Points Ratio and a Destruction Derby Panel about player and some settings:].When you will die get an amount of points and that points will be saved Data in your account.Thank you For Reading
  3. VegasBoy

    OpenPorts

    Hello guys i have a problem somone can help me !? First thing my problem: I have a friend who wants to do a server all good but he dont have A router only a simple network cable not router in all house network for phone or etc...And when he do openports hes ports are closed.I searched on google/youtube about some tutorials but all use Router to Port Forward Somone can help me? 2.When im doing a server i have it on internet but no host and when i close it and open again(shout down my pc) my server is only at local and no move on Internet Browsing what to do ? Please help? i think not all servers have a router to open theyr ports? Right?
  4. Guys*READ THIS IMPORTANT*Help us in a Championship Tournament whit a server to reunite all M.T.A. Players!!!Who Can help us with some Slots because we are much players*All Are welcome of course!Plase contact BlackGamer56 Or ArthurelBv about the server sustain with slots.*THANK YOU FOR READING* Cheers,BlackGamer56 Regards,DrunK3
  5. Guys*READ THIS IMPORTANT*Help us in a Championship Tournament whit a server to reunite all M.T.A. Players!!!Who Can help us with some Slots because we are much players*All Are welcome of course!Plase contact BlackGamer56 Or ArthurelBv about the server sustain with slots.*THANK YOU FOR READING* Cheers,BlackGamer56 Regards,DrunK3
×
×
  • Create New...