Jump to content

sckatchof

Members
  • Posts

    394
  • Joined

  • Last visited

Everything posted by sckatchof

  1. thank you agian for help but it dont work.
  2. And this : exports["scoreboard"]:scoreboardAddColumn("Zone",root,30,"City") function CityZ() local city = getZoneName ( x, y, z ) setElementData (city,"Zone" , getZoneName (source)) end setTimer(CityZ, 1000, 1) addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), CityZ )
  3. hello guys i want to make ascript that sho in scorboad like this pic This is my script : exports["scoreboard"]:scoreboardAddColumn("Zone",root,30,"City") function CityZ() local playerX, playerY, playerZ = getElementPosition ( localPlayer ) local playerZoneName = getZoneName ( playerX, playerY, playerZ ) setElementData (source,"Zone" , playerZoneName) end setTimer(CityZ, 1000, 1) addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), CityZ )
  4. No i read it thank you kenix
  5. thank you again snake
  6. but in this dont work why ? Bad argument @'setElementData' staffTeam = createTeam ("Staff", 255, 255, 255) setTeamFriendlyFire (staffTeam, false) function joinTeam (source) local accName = getAccountName (getPlayerAccount (source)) if (isObjectInACLGroup ("user." .. accName, aclGetGroup("Admin")) or isObjectInACLGroup ("user." .. accName, aclGetGroup ("Moderator")) or isObjectInACLGroup ("user." .. accName, aclGetGroup ("SuperModerator")) ) then if (staffTeam) then setPlayerTeam (source, staffTeam) setElementData( thePlayer, "Jobn", "Head Staff", true ) outputChatBox ( "You are now Staff.", 0,255, 0 ) end end end addCommandHandler ("staff", joinTeam)
  7. work Thank you snake for help
  8. sckatchof

    Need Help

    hi guys i make a script when i type /criminal i became on the team this is my script criminalTeam = createTeam ("Criminal", 255, 0, 0) function joinTeam (source) local criminalTeam = getTeamFromName ("Criminal") if (criminalTeam) then setElementData( localPlayer, "Job", "Criminal", true ) setPlayerTeam (source, criminalTeam) setElementModel (source, 29) end end addCommandHandler ("criminal", joinTeam)
  9. thank yooooou snake for ur help.
  10. thnaks snake but it dont work
  11. thank yooou snake it's work but how can i attach the blip in player function orten(thePlayer,playername) local player = getPlayerFromName(playername) if (player) then local x,y,z = getElementPosition ( player ) local blip = createBlip (x, y, z, 41, 4, 255, 0, 0,255, 0, 99999.0, thePlayer) setTimer(destroyElement,20000,1,blip) else outputChatBox("Player not found",thePlayer,255,0,0) end end addEvent("orten", true) addEventHandler("orten", getRootElement(), orten) addCommandHandler("orten", orten)
  12. thnx snake but when i select player from the gui i want to mark him in my police compture i cants find any player lit show like this msg Player not found this is the part from client side .... p_column = guiGridListAddColumn( CopComputer_Grid[1], "player", 0.70 ) w_column = guiGridListAddColumn( CopComputer_Grid[1], "Wanteds", 0.20) guiGridListSetSelectionMode(CopComputer_Grid[1],1) CopComputer_Button[3] = guiCreateButton(43,365,108,35,"locate",false,CopComputer_Window[1]) ..... function btn3() local rowindex, columnindex = guiGridListGetSelectedItem ( CopComputer_Grid[1] ) playername = guiGridListGetItemText ( CopComputer_Grid[1], rowindex, 1) triggerServerEvent("orten", getRootElement(), getLocalPlayer(),"orten", playername) setTimer(refreshcopcomp,1000,1) end i want when i select player it show blip attach to the player in radar
  13. sckatchof

    Need Help

    hi guys i have problem in this lien x,y,z = getElementPosition ( getPlayerFromName(playername) ) function MarkPlayer(thePlayer,cmd,playername) x,y,z = getElementPosition ( getPlayerFromName(playername) ) local blip = createBlip (x, y, z, 41, 4, 255, 0, 0,255, 0, 99999.0, thePlayer) setTimer(destroyElement,20000,1,blip) end addEvent("orten", true) addEventHandler("orten", getRootElement(), MarkPlayer)
  14. Now it work thank yooooooooooooouuu
  15. ferst thank you for help again and why u put marker ? I don't know if u understand me or not i make a map a nightclub and i want to put radio3D and when i leave nightclub it show in chatbox this message : RADIO: Stream stopped. Many times
  16. Thank you for help but it stay show like this i don't know why ! ------- -------
  17. Sorry kenix for Disturbance but i remove timer and i have a some problem. Like this : local posX, posY, posZ = 269.70001220703, -1895.0999755859, 0.69999998807907 local RadioColshape = createColCircle ( 269.70001220703, -1895.0999755859, 0.69999998807907,150 ) local radioURL = "http://www.181.fm/winamp.pls?station=181-power&style=mp3" local radius = 150 local volume = 4.0 local bSpam local radio = playSound3D( radioURL, posX, posY, posZ, false ) setSoundVolume( radio, volume) setSoundMaxDistance( radio, radius ) addEventHandler( "onClientColShapeLeave",RadioColshape, function( tplayer ) if getElementType( tplayer ) == "player" and tplayer == localPlayer then if not bSpam then bSpam = true setTimer( function( ) bSpam = false end, 50000, 1 ) end end end )
  18. thank guys and kenix for help but some problem when i leave. I want when i leave the area nothing nothing shows in chatbox or show one time
  19. Yes when i leave it show like this picture.
  20. thanx guys for help but i have some problem when i leave the area again : this is my client side : local posX, posY, posZ = 269.70001220703, -1895.0999755859, 0.69999998807907 local RadioColshape = createColCircle ( 269.70001220703, -1895.0999755859, 0.69999998807907,150 ) local radioURL = "http://www.181.fm/winamp.pls?station=181-power&style=mp3" local radius = 150 local volume = 4.0 addEventHandler("onClientResourceStart",resourceRoot, function() local radio = playSound3D(radioURL, posX, posY, posZ, false) setSoundVolume(radio, volume) setSoundMaxDistance(radio, radius) end ) message = { "#ffff00RADIO: #ffffffStream stopped" } addEventHandler("onClientColShapeLeave",RadioColshape, function(tplayer) if (getElementType(tplayer) == "player" and tplayer == localPlayer) then local msg = math.random(#message) setTimer(outputChatBox, 800, 1, msg, tplayer, 255, 255, 255, true) end end ) and this is mta.xml
  21. Thanxx for help but some problem
  22. some problem , but thnx for ur help
  23. any error and some problem .
  24. I understand you but some problem if u want test it and thnx again you mean like this local posX, posY, posZ = 269.70001220703, -1895.0999755859, 0.69999998807907 local RadioColshape = createColCircle ( 269.70001220703, -1895.0999755859, 0.69999998807907,150 ) local radioURL = "http://www.181.fm/winamp.pls?station=181-power&style=mp3" local radius = 150 local volume = 4.0 local thisRoot = getResourceRootElement(getThisResource()) local root = getRootElement() local RadioColshape = createColCircle ( 269.70001220703, -1895.0999755859, 0.69999998807907,150 ) addEventHandler("onClientResourceStart", thisRoot, function() local radio = playSound3D(radioURL, posX, posY, posZ, false) setSoundVolume(radio, volume) setSoundMaxDistance(radio, radius) end) addEventHandler("onClientResourceStop", thisRoot, function() destroyElement(colShape) end)
  25. thnx for help but some problem local posX, posY, posZ = 269.70001220703, -1895.0999755859, 0.69999998807907 local RadioColshape = createColCircle ( 269.70001220703, -1895.0999755859, 0.69999998807907,150 ) local radioURL = "http://www.181.fm/winamp.pls?station=181-power&style=mp3" local radius = 150 local volume = 4.0 local thisRoot = getResourceRootElement(getThisResource()) local root = getRootElement() local RadioColshape = createColCircle ( 269.70001220703, -1895.0999755859, 0.69999998807907,150 ) addEventHandler("onClientResourceStart", thisRoot, function() local radio = playSound3D(radioURL, posX, posY, posZ, false) setSoundVolume(radio, volume) setSoundMaxDistance(radio, radius) end) addEventHandler("onColShapeLeave", getRootElement(), function(leaveElement, matchingDimension) if getElementType(leaveElement) == "player" then outputChatBox("#FFFF00RADIO: #FFFFFFStream stopped.", leaveElement, 255, 255, 255, true) end end)
×
×
  • Create New...