Jump to content

Overkillz

Members
  • Posts

    545
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Overkillz

  1. I have already tried it, sorry for don't change the value 1 to 0, but it doesn't work too ;(
  2. Hey dear community, I hope u are fine ^^ Well, Im here again, to post my question, Im trying to do put a Random Color Team every x time, but, I get the random color just restarting the resource. 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,1,idkname) setTimer(g,1000,1,idkname) setTimer(b,1000,1,idkname) I will like that it change the color of the teamname every 1 second I hope u can help me, thanks ^^ Regards.
  3. Can u help me a bit more, IDK what should I do with these variables (if are them) And thanks for answer ^^
  4. Overkillz

    Mute song

    Hey everyone, Im currently having an issue with this. I have added a song when the podium start, buy if x maps has a song, people heard both songs, from map and from podium. function showWinnerMsg() local sound = playSound("audio/xd.mp3") setSoundVolume(sound, 1) local playerTable = {} local vehicleTable = {} for i=1,#RankingBoard.labels do playerTable[i] = RankingBoard.labels[i].name vehicleTable[i] = RankingBoard.labels[i].vehicle end hideTimes() createPodiumEffect(playerTable,vehicleTable) end addEvent("showWinMessage",true) addEventHandler("showWinMessage",getRootElement(),showWinnerMsg) I will like to mute map song when the podium song starts. I hope you can help me. Thanks and regards.
  5. Hey dear community, today I decided to create a Play Server But, when a player join, and his name is: Example: Multi#00ff00TheftAuto He got a random color name before his color name, it is a random color like #4e4e4eMulti#00ff00TheftAuto I will like to put them #ffffff If they don't use a Hex color code, then all should be White, can you tell me which script I need to modify or make. Thanks for ur time. Regards.
  6. I made a little modification local scriptcol = {{255,178,0,true},{255,0,0,true},{255,255,255,true}} --end utility-- -------------------------------------- addCommandHandler("status", function (player, command, target, value) local account = getPlayerAccount(player) if (isObjectInACLGroup("user." ..getAccountName(account), aclGetGroup("Admin"))) then if string.find(getPlayerName(player), "") then if (target) and (value) then local targetPlayer = getPlayerWildcard(target) if (targetPlayer) then if not (isGuestAccount(getPlayerAccount(targetPlayer))) then setAccountData(getPlayerAccount(targetPlayer),"playerstatus", value) outputChatBox("#FFFFFF[Admin] #00ccffSuccessfully settet staus for#FFFFFF"..getPlayerName(targetPlayer).." "..tostring(value).." ",player,unpack(scriptcol[1])) outputChatBox("#FFFFFF[Admin] "..getPlayerName(player).."#00FF00 set you an new status '"..tostring(value).."'",targetPlayer,unpack(scriptcol[3])) return else outputChatBox("#FFFFFF[Admin] #00ccffError: Target not logged in!",player,unpack(scriptcol[2])) end else outputChatBox("#FFFFFF[Admin] #00ccffError: Could not find player!",player,unpack(scriptcol[2])) end else outputChatBox("#FFFFFF[Admin] #00ccffError: Syntax error: /status !",player,unpack(scriptcol[2])) end else outputChatBox("#FFFFFF[Admin] #00ccffError: You can't use this function!",player,unpack(scriptcol[2])) end end end) ------------------------------------------------------------------- --SCOREB function makeCol() exports.scoreboard:addScoreboardColumn("Status") end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), makeCol) function destrCol() exports.scoreboard:removeScoreboardColumn("Status") end addEventHandler("onResourceStop", getResourceRootElement(getThisResource()), destrCol) function onJoinSetG() setElementData(source, "Status", "guest") end addEventHandler("onPlayerJoin", getRootElement(), onJoinSetG) function onLoginSetC(thePreviousAccount, current, autoLogin) setElementData(source, "Status", getAccountData(current, "playerstatus")) end addEventHandler("onPlayerLogin", getRootElement(), onLoginSetC) Now DebugScript 3 tell me: ..../Status.lua:12: attemp to call global 'getPlayerWildcard' (a nil value) I hope you can help me . Regards.
  7. Ok, I saw it, but this will not fix the problem, what I can do ? I delete that output ... but the problem is [Admin] Error: You can't use this function! What should I put here ? if string.find(getPlayerName(player), "") then Thanks for answer and regards.
  8. Hey everyone, I have a problem with this script that I want to fix, It is a old script, but I fixed it more less, but it doesn't set the status. IDK what is the problem, I check all, and all its correct. local scriptcol = {{255,178,0,true},{255,0,0,true},{255,255,255,true}} --end utility-- -------------------------------------- addCommandHandler("status", function (player, command, target, value) local account = getPlayerAccount(player) if (isObjectInACLGroup("user." ..getAccountName(account), aclGetGroup("Admin"))) then if string.find(getPlayerName(player), "Luis") then if (target) and (value) then local targetPlayer = getPlayerWildcard(target) if (targetPlayer) then if not (isGuestAccount(getPlayerAccount(targetPlayer))) then setAccountData(getPlayerAccount(targetPlayer),"playerstatus", value) outputChatBox("#FFFFFF[Admin] #00ccffSuccessfully settet staus for#FFFFFF"..getPlayerName(targetPlayer).." "..tostring(value).." ",player,unpack(scriptcol[1])) outputChatBox("#FFFFFF[Admin] "..getPlayerName(player).."#00FF00 set you an new status '"..tostring(value).."'",targetPlayer,unpack(scriptcol[3])) return else outputChatBox("#FFFFFF[Admin] #00ccffError: Target not logged in!",player,unpack(scriptcol[2])) end else outputChatBox("#FFFFFF[Admin] #00ccffError: Could not find player!",player,unpack(scriptcol[2])) end else outputChatBox("#FFFFFF[Admin] #00ccffError: Syntax error: /status !",player,unpack(scriptcol[2])) end else outputChatBox("#FFFFFF[Admin] #00ccffError: You can't use this function!",player,unpack(scriptcol[2])) end else outputChatBox("#FFFFFF[Admin] #00ccffError: You can't use this function!",player,unpack(scriptcol[2])) end outputChatBox("#FFFFFF[Admin] #00ccffError: Could not find the datatype!",player,unpack(scriptcol[2])) end) ------------------------------------------------------------------- --SCOREB function makeCol() exports.scoreboard:addScoreboardColumn("Status") end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), makeCol) function destrCol() exports.scoreboard:removeScoreboardColumn("Status") end addEventHandler("onResourceStop", getResourceRootElement(getThisResource()), destrCol) function onJoinSetG() setElementData(source, "Status", "guest") end addEventHandler("onPlayerJoin", getRootElement(), onJoinSetG) function onLoginSetC(thePreviousAccount, current, autoLogin) setElementData(source, "Status", getAccountData(current, "playerstatus")) end addEventHandler("onPlayerLogin", getRootElement(), onLoginSetC) Debugscript 3: Nothing Outputchatbox: [Admin] Error: You can't use this function! [Admin] Error: Could not find the datatype! ---------------------------- Im logged as admin, and the account is in the group "Admin" Im writing part of the name or all the name correctly and after set the status Example: ./status Luis test I hope you can help me. Regards.
  9. Hey dear community, I recently got a VPS Linux Debian 7 I move all my things, including - registry.db - internal.db But, when Im running a map, I cant see the tops, all tops are empty, I can't make new TopTimes and nothing, Yes, I gave it Admin rights but still with nothing. I hope you can help me Regards. PS: I posted this here, because may is a problem with a scritp.
  10. Hey dear community, I recently got a VPS Linux Debian 7 I move all my things, including - registry.db - internal.db But, when Im running a map, I cant see the tops, all tops are empty, I hope you can help me. Regards.
  11. Hey everone, Im trying to render a imagen using a server event"onPlayerLogin", but It doesn't work, Im too nab on Script, Im learning and I hope you can fix this error: - Cliente addEvent('Shimu', true) function Shimu ( ) addEventHandler("onClientRender", getRootElement(), shimuLoading) end - Server addEventHandler('onPlayerLogin', root, ------Will not be "root" function ( ) triggerClientEvent(source, 'Shimu', source ) end ) Thanks and regards.
  12. I wont delete de countdown, just the text, because Im using a Podium.
  13. Hey newly, I have a problem with the playsound, I can't hear my song when I login in my server - Client function surprise () local sound = playSound("surprise.mp3") setSoundVolume(sound, 1.0) end addEventHandler("onPlayerLogin", getLocalPlayer(), surprise) - Meta "surprise.mp3" /> I hope you can help me
  14. Hi everyone, I hope you can help me with this little problem. Actually, Im trying to hide " Next map starts in : 3,2, ...etc " function RaceMode.endMap() if stateAllowsPostFinish() then gotoState('PostFinish') local text = g_GameOptions.randommaps and 'Next map starts in:' or 'Vote for next map starts in:' Countdown.createDx(text,5, RaceMode.startNextMapSelect) triggerEvent('onPostFinish', g_Root) end end I tried to do this: function RaceMode.endMap() if stateAllowsPostFinish() then gotoState('PostFinish') local text = g_GameOptions.randommaps and '' or '' Countdown(5, RaceMode.startNextMapSelect) triggerEvent('onPostFinish', g_Root) end end I deleted " createDx " but when the race end, it got infinite time waiting " Type: Race
  15. Thanks so much, it work perfectly, without any bug ^^
  16. I cant heard nothing local angle = 0 function loadingtravel() local screenWidth, screenHeight = guiGetScreenSize() angle = angle +7 dxDrawImage(screenWidth/2-32, screenHeight/2-32, 64, 64, 'img/travelling.png', angle,0,0) fadeCamera ( false, 0, 0, 0, 0 ) end function sound2 () local sound = playSound("audio/xd.mp3") setSoundVolume(sound, 1.0) end addEventHandler("onClientRender",resourceRoot,sound2) addEventHandler("onClientRender",resourceRoot,loadingtravel)
  17. No, just mission acomplice, but it shouldm't work, just on race maps when someone finish the map, but while travelling, I heard a annoying sound which give me lag. I tried with 1.0 and 0.5 and doesnt work.
  18. Now the problem is, I heard a song like a anoying sound which lag me, I can move and nothing, maybe 0.1 fps and I need to close the game, idk why ...
  19. it doesnt work local angle = 0 function loadingtravel() local screenWidth, screenHeight = guiGetScreenSize() angle = angle +7 dxDrawImage(screenWidth/2-32, screenHeight/2-32, 64, 64, 'img/travelling.png', angle,0,0) fadeCamera ( false, 0, 0, 0, 0 ) end function sound2 () local sound = playSound("audio/xd.mp3") setSoundVolume(sound,1.0) end addEventHandler("onClientRender",root,sound2) addEventHandler("onClientRender",root,loadingtravel)
  20. I cant hear the music: Debuscript: WARNING: race/race_client.lua:186: Bad'sound/player' pointer @ 'setSoundVolume (1)
  21. Hi everyone, I will like do a Playsound while is changing of map, (On Travelling) but IDK why this doesn't work: local angle = 0 function loadingtravel() local screenWidth, screenHeight = guiGetScreenSize() angle = angle +7 dxDrawImage(screenWidth/2-32, screenHeight/2-32, 64, 64, 'img/travelling.png', angle,0,0) fadeCamera ( false, 0, 0, 0, 0 ) end function sound () local sound = playSound("audio/xd.mp3") setSoundVolume(sound, 1) end addEventHandler("onClientRender",getLocalPlayer(),sound,loadingtravel) I hope you can help me ^^
  22. dxDrawImage(posX+sizeX,posY,20,25,"data/exmple.png",0,0,0,tocolor(255,0,0,255)) I think u are trying to find this.
×
×
  • Create New...