Wei Posted July 8, 2012 Posted July 8, 2012 Hi. I have problem. When I hit marker I start a route and when otheplayer hit it(he can't see it) then it starts again/(only for me). How can I fix? CODE client: function createHackerRoute() if getElementData( localPlayer, "Role" ) == "Hacker" then if not getElementData( localPlayer, "Route" ) then outputChatBox("Your hacker route has been started", 255, 255, 0, true) cMakerAndStartNewRoute() setElementData( localPlayer, "Route", true ) else outputChatBox("You have allready started a route", 255, 255, 0, true) end end end addCommandHandler("hackerroute", createHackerRoute) function cMakerAndStartNewRoute() local x,y,z = mathTheHackerRandomPosition() hackerMarker = createMarker( x,y,z-1, "cylinder", 2 ) hackerBlip = createBlipAttachedTo( hackerMarker, 19 ) addEventHandler("onClientMarkerHit", hackerMarker, cTimerHacker) end function cTimerHacker() theTimer = setTimer( checkIFisTimer , 30000, 1 ) setElementFrozen( localPlayer, true ) addEventHandler ( "onClientRender", root, createText ) end Diet with russian vodka, lose 3 days in one week !
50p Posted July 8, 2012 Posted July 8, 2012 Check if the hit element is "you". Since you seem to do it client-side then check if the hit element is localPlayer. - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
Wei Posted July 8, 2012 Author Posted July 8, 2012 thanks work ! Diet with russian vodka, lose 3 days in one week !
Wei Posted July 8, 2012 Author Posted July 8, 2012 function refreshPoliceComputerGridList() guiGridListClear ( policeComputerGUI["PlayerGridList"] ) for index, player in ipairs (getElementsByType("player")) do if getPlayerWantedLevel( player ) >= 1 then local row = guiGridListAddRow ( policeComputerGUI["PlayerGridList"] ) guiGridListSetItemText ( policeComputerGUI["PlayerGridList"], row, policeComputerGUI["PlayerNameColumn"], getPlayerName ( player ), false, false ) guiGridListSetItemText ( policeComputerGUI["PlayerGridList"], row, policeComputerGUI["PlayerWantedLevel"], " "..getPlayerWantedLevel( player ), false, false ) guiGridListSetItemText ( policeComputerGUI["PlayerGridList"], row, policeComputerGUI["MoneyBonus"], " "..getPlayerWantedLevel( player )*15000, false, false ) end end end Why it adds all players and all players has the same wanted level as I ? Diet with russian vodka, lose 3 days in one week !
Guest Guest4401 Posted July 8, 2012 Posted July 8, 2012 int getPlayerWantedLevel ( ) Look at the getPlayerWantedLevel's syntax. If you're using it clientside, it only gets the wanted level of localPlayer.
Wei Posted July 8, 2012 Author Posted July 8, 2012 What can I do ? Diet with russian vodka, lose 3 days in one week !
Guest Guest4401 Posted July 8, 2012 Posted July 8, 2012 Get the wanted player of every player serverside, and then trigger it clientside.
Wei Posted July 8, 2012 Author Posted July 8, 2012 how can I set screen blur level ? Diet with russian vodka, lose 3 days in one week !
Castillo Posted July 8, 2012 Posted July 8, 2012 setBlurLevel San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Jaysds1 Posted July 8, 2012 Posted July 8, 2012 (edited) setBlurLevel or setPlayerBlurLevel Edited July 9, 2012 by Guest My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
Wei Posted July 8, 2012 Author Posted July 8, 2012 But it's allways the same... Diet with russian vodka, lose 3 days in one week !
Jaysds1 Posted July 9, 2012 Posted July 9, 2012 What value's have you used? Try experimenting and setting the blur level 255 then 0 and see the difference. My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now