Jump to content

-.Paradox.-

Members
  • Posts

    1,239
  • Joined

  • Last visited

Everything posted by -.Paradox.-

  1. function proxy() if isElement(sound) then destroyElement(sound) local sound = playSound("music/proxy.mp3") setSoundVolume(sound, 50) end end addEvent( "proxy", true ) addEventHandler( "proxy", getRootElement(), proxy ) function crackin( name ) local sound = playSound("music/crackin.mp3") setSoundVolume(sound, 50) setSoundMaxDistance( sound, 5000 ) end addEvent( "crackin", true ) addEventHandler( "crackin", getRootElement(), crackin ) ?
  2. -.Paradox.-

    Help

    Oh, i didn't noticed that, thanks for telling, is there anyway to fix it?
  3. In client or server?
  4. -.Paradox.-

    Help

    The script is working fine, i just get that spam of error in debug
  5. I think same, but how? I know the stopSound function but idk about check music streaming
  6. -.Paradox.-

    Music

    Hello, i made this music system, but when i have one problem, when a random player run the music, and i run another one in the same time, the music that he runned must stop automatically, can somebody find a solution for this please? thanks Client: function proxy() local sound = playSound("music/proxy.mp3") setSoundVolume(sound, 50) end addEvent( "proxy", true ) addEventHandler( "proxy", getRootElement(), proxy ) function crackin( name ) local sound = playSound("music/crackin.mp3") setSoundVolume(sound, 50) setSoundMaxDistance( sound, 5000 ) end addEvent( "crackin", true ) addEventHandler( "crackin", getRootElement(), crackin ) Server: function proxy(player, cmd) local name1 = getPlayerName(player) local r,g,b = getPlayerNametagColor (player) local accountname = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then outputChatBox ( "" .. name1 .. "#2600FF Playing Proxy", getRootElement(), r, g, b, true ) triggerClientEvent ("proxy", getRootElement()) else outputChatBox ( "This command for Admins group", player, 255, 0, 0, true ) return end end addCommandHandler("proxy", proxy ) function crackin(player, cmd) local name = getPlayerName(player) local r,g,b = getPlayerNametagColor (player) local accountname = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then outputChatBox ( "" .. name .. "#2600FF Playing Crackin", getRootElement(), r, g, b, true ) triggerClientEvent ("crackin", getRootElement()) else outputChatBox ( "This command is for Admin group", player, 255, 0, 0, true ) return end end addCommandHandler("crackin", crackin)
  7. -.Paradox.-

    Help

    I think i will use serials, here is my code; local serialMute = { } function doTask(thePlayer, cmd, taskId, playername, arg3, arg4) if taskId then local taskId = tonumber(taskId) --forgot this line local player = getPlayerFromName(playername or "") if player then if taskId == 1 then local duration = (tonumber(arg3) or 0) * 60 * 1000 setPlayerMuted(player, true) outputChatBox("You have been muted for "..tostring(arg3).." mins.[Reason]: #1.Only English in Main Chat (mute)", player, 255, 0, 0) setTimer( function() setPlayerMuted(player, true) outputChatBox("You have been unmuted.", player, 0, 255, 0) end, duration, 1, player ) serialMute [ getPlayerSerial ( player ) ] = { duration, timer } end end end end addCommandHandler("task", doTask) function onJoin () local serial = getPlayerSerial( source ) local muted = serialMute [ serial ] if ( type ( muted ) == "table" ) then if ( muted [ 1 ] ) then setPlayerMuted ( source, true ) local timer = setTimer ( unMute, muted [ 1 ], 1, source ) serialMute [ serial ] [ 2 ] = timer return end end setPlayerMuted ( source, false ) end addEventHandler ( "onPlayerJoin", getRootElement(), onJoin ) addEventHandler ( "onPlayerQuit", root, function ( ) local serial = getPlayerSerial ( source ) local muted = serialMute [ serial ] if ( type ( muted ) == "table" ) then if isTimer ( muted [ 2 ] ) then local timeLeft = getTimerDetails ( muted [ 2 ] ) killTimer ( muted [ 2 ] ) serialMute [ serial ] [ 1 ] = timeLeft end end end ) function unmute ( thePlayer ) if isElement ( thePlayer ) then setPlayerMuted ( thePlayer, false ) serialMute [ getPlayerSerial ( thePlayer ) ] = nil outputChatBox ( "You have been unmuted.", thePlayer, 0, 255, 100 ) end end Oh nvm i fixed it I replaced from line 9 to 20 with this local duration = (tonumber(arg3) or 0) * 60 * 1000 setPlayerMuted(player, true) outputChatBox("You have been muted for "..tostring(arg3).." mins.[Reason]: #1.Only English in Main Chat (mute)", player, 255, 0, 0) local timer = setTimer ( unmute, duration, 1, player ) serialMute [ getPlayerSerial ( player ) ] = { duration, timer } --[[ setTimer( function() setPlayerMuted(player, true) outputChatBox("You have been unmuted.", player, 0, 255, 0) end, duration, 1, player )]]
  8. -.Paradox.-

    Help

    I have no knowledge on MySql and SQlite
  9. -.Paradox.-

    Help

    Excuse me, i want to save it into players serials, so when the player reconnect he will be muted, any ideas? I will send you my code in pm
  10. -.Paradox.-

    Help

    Line 11, sorry for late reply.
  11. -.Paradox.-

    Help

    Hello, guys i have this error in debug when i run my script, i cant post it all but here is the important part, and the error i get WARNING: UserPanel\client.lua:1079: Bad argument @ 'guiGridListSetItemText' [Expected string at argument 4,got boolean] Client; local root = xmlLoadFile("anims.xml") if ( root ) then for i,group in ipairs(xmlNodeGetChildren( root ) ) do local row = guiGridListAddRow( AnimAllGrid ) local block = xmlNodeGetAttribute( group, "name" ) guiGridListSetItemText( AnimAllGrid, row, 1, block, true, false ) for i,anim in ipairs( xmlNodeGetChildren( group ) ) do row = guiGridListAddRow( AnimAllGrid ) name = xmlNodeGetAttribute( anim, "name" ) guiGridListSetItemText( AnimAllGrid, row, 1, name, false, false ) guiGridListSetItemText( AnimAllGrid, row, 2, block, false, false ) guiGridListAutoSizeColumn( AnimAllGrid, AnimAllAnimCol ) guiGridListAutoSizeColumn( AnimAllGrid, AnimAllBlockCol ) end end xmlUnloadFile( root ) end end
  12. Can you send me the link please, I've found only. A script that add modded cars and skins and wepons etc
  13. -.Paradox.-

    Question

    Hi guys, is there a resource that make the player decide if he want download the file or no Like example when I press b it show a panel contain musics and all of them are not avaible, so when the player select a song he see download button, and when he finish downloading the song then the download button disappear and it appear instead of it Play button and Stop button, if there is no such resource that does that tell me guys functions that I can use to make it, thanks a lot.
  14. Do you mean that there is another resource make the player respawn two times instead of one? I can't understand
  15. I just noticed that there is one problem, when i die i want to save my weapons (i'm using you're script for saving weapons when die) but the first time i die i can see my weapons but after 1 or 2 seconds i respawn again without my weapons, thanks for help. local playerWeapons = { } addEventHandler ( "onPlayerWasted", root, function ( ) if ( not playerWeapons [ source ] ) then playerWeapons [ source ] = { } end for slot = 0, 12 do local weapon = getPedWeapon ( source, slot ) if ( weapon > 0 ) then local ammo = getPedTotalAmmo ( source, slot ) if ( ammo > 0 ) then playerWeapons [ source ] [ weapon ] = ammo end end end end ) addEventHandler ( "onPlayerSpawn", root, function ( ) if ( playerWeapons [ source ] ) then for weapon, ammo in pairs ( playerWeapons [ source ] ) do giveWeapon ( source, tonumber ( weapon ), tonumber ( ammo ) ) end end playerWeapons [ source ] = nil end )
  16. If i knew how, i would do it without asking you, so please can you help me?
  17. local blip = { } addEventHandler ( "onPlayerLogin", root, function ( ) if ( not isElement ( blip [ source ] ) ) then blip [ source ] = createBlipAttachedTo ( source ) end local theTeam = getPlayerTeam ( source ) if ( not theTeam ) then return end local r, g, b = getTeamColor ( theTeam ) setPlayerNametagColor ( source, r, g, b ) setBlipColor ( blip [ source ], r, g, b, 255 ) end ) addEventHandler ( "onPlayerQuit", root, function ( ) if isElement ( blip [ source ] ) then destroyElement ( blip [ source ] ) end end )
×
×
  • Create New...