Jump to content

Anubhav

Members
  • Posts

    2,277
  • Joined

  • Last visited

Everything posted by Anubhav

  1. Oh local colors = { {r=255,g=0,b=0}, -- SYNTAX: {r=rValue, g=gValue, b=bValue}, } times = nil team = createTeam ( "Team Name" ) function idkname () for k,v in ipairs(colors) if times == "random" then setTeamColor(team, math.random(0,255), math.random(0,255), math.random(0,255)) times = "rgbcolor" return end times = "random" setTeamColor(team, v.r, v.g, v.b) end end setTimer(idkname ,1000,0)
  2. Show the server side script where its using event accounts:characters:spawn.
  3. If the value of r is 255 then it will set r to 255. local colors = { {r=255,g=0,b=0}, -- SYNTAX: {r=rValue, g=gValue, b=bValue}, } team = createTeam ( "Team Name" ) function idkname () for k,v in ipairs(colors) setTeamColor(team, v.r, v.g, v.b) end end setTimer(idkname ,1000,0)
  4. What were the problems?
  5. team = createTeam ( "Team Name" ) function idkname () local r = math.random(0,255) local g = math.random(0,255) local b = math.random(0,255) if r == 255 then setTeamColor ( team, r, g, b ) else setTeamColor(team, r, g, b ) end end setTimer(idkname ,1000,0)
  6. function loginHandler(password) local account = getAccount(getPlayerName(source)) if (account ~= false) then local loggedIn = logIn(source, account, password) if (loggedIn ~= false) then outputChatBox(" ", source) outputChatBox(" ", source) outputChatBox(" ", source) outputChatBox(" ", source) outputChatBox(" ", source) outputChatBox(" ", source) outputChatBox(" ", source) outputChatBox(" ", source) outputChatBox(" ", source) outputChatBox(" ", source) outputChatBox("Welcome back "..getPlayerName(source):gsub('#%x%x%x%x%x%x', '')..".", source, 18, 11, 150) triggerClientEvent("hideLoginWindow", source) else outputChatBox(" ", source) outputChatBox(" ", source) outputChatBox(" ", source) outputChatBox(" ", source) outputChatBox(" ", source) outputChatBox(" ", source) outputChatBox(" ", source) outputChatBox(" ", source) outputChatBox(" ", source) outputChatBox(" ", source) outputChatBox("Invalid password entered.", source) end else if (password ~= "" and password ~= nil) then local accountAdded = addAccount(getPlayerName(source), password) if (accountAdded) then outputChatBox("Thank you for registering "..getPlayerName(source):gsub('#%x%x%x%x%x%x', '')..".", source, 112, 0, 0) outputChatBox("If you click 'Submit' again you can login.", source, 112, 0, 0) end else outputChatBox("You must enter a password.", source) end end end addEvent("accLogReg", true) addEventHandler("accLogReg", root, loginHandler) function saveAccount() local playerAcc = getPlayerAccount(source) local playerCash = getPlayerMoney(source) setAccountData(playerAcc, "hdt.cash", playerCash) end addEventHandler("onPlayerQuit", getRootElement(), saveAccount) function loadAccount() local playerAcc = getPlayerAccount(source) if (playerAcc) then local playerCash = getAccountData(playerAcc, "hdt.cash") local playerLoads = getAccountData(playerAcc, "hdt.loads") if (playerCash) then setPlayerMoney(source, playerCash) end if (playerLoads) then setElementData(source, "Completed Loads", playerLoads) else setElementData(source, "Completed Loads", 0) end end end addEventHandler("onPlayerLogin", getRootElement(), loadAccount)
  7. wait function idkname () local r = math.random(0,255) local g = math.random(0,255) local b = math.random(0,255) team = createTeam ( "Team Name" ) setTeamColor ( team, r, g, b ) end addEventHandler("onResourceStart", resourceRoot, idkname) setTimer(idkname,1000,0) This should work :#
  8. function idkname () local r = math.random(0,255) local g = math.random(0,255) local b = math.random(0,255) team = createTeam ( "Team Name" ) setTeamColor ( team, r, g, b ) end addEventHandler("onResourceStart", resourceRoot, idkname) setTimer(idkname ,1000,0)
  9. function idkname () local r = math.random(0,255) local g = math.random(0,255) local b = math.random(0,255) team = createTeam ( "Team Name" ) setTeamColor ( team, r, g, b ) end addEventHandler("onResourceStart", resourceRoot, idkname) setTimer(r,1000,0,idkname) setTimer(g,1000,0,idkname) setTimer(b,1000,0,idkname) setTimer @ Arguement 3 was 1. It will only be executed 1 time if it was 1. 0 for unlimited times
  10. Anubhav

    [Q] Network

    [url=https://wiki.multitheftauto.com/wiki/GetNetworkStats]https://wiki.multitheftauto.com/wiki/GetNetworkStats[/url]
  11. I've reported him instead of posting shits.. I am realy sorry if I did something wrong here
  12. Din't you copied my code? Are you mad? keep calm 1 reply is enough kid.
  13. Din't you copied my code?
  14. addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource() ), function () for i, p in ipairs ( getElementsByType ( "player" ) ) do local account = getPlayerAccount (p) if not ( isGuestAccount( account ) ) then if ( getAccountData ( p , "vip" ) ) then setElementData ( p, "vip", true ) setElementData ( p, "vip.time", tonumber ( getAccountData ( p, "vip.time" ) ) ) startVip ( p ) end end end end )
  15. Use tostring on getElementData.
  16. function exportThisFunction() return variablleName or tableName end
  17. He'd scammed you. Get your money back. Go to hosting section and go for Vortex Hosting. It will get you a non-laggy server and with all access. It had no problem till now. Not even a single lag or crash!
  18. No. Interiors are mainly inside the group and in diffrent dimension or thier too up in sky with diffrent dimension!
  19. function finishLoad(player, cash) local cash = tostring(cash) givePlayerMoney(player, tonumber(cash)) setLoadCount() end addEvent("finishRoute", true) addEventHandler("finishRoute", root, finishLoad) function setLoadCount() local playerAcc = getPlayerAccount(source) local loads = getAccountData(playerAcc, "hdt.loads") if (loads) then setAccountData(playerAcc, "hdt.loads", loads+1) setElementData(source, "Completed Loads", tostring(loads)) end end
×
×
  • Create New...