-
Posts
1,134 -
Joined
-
Last visited
-
Days Won
37
Everything posted by NeXuS™
-
I won't test until I don't see what's the problem.
-
Ahh, because you don't know how to use debugscript. function cancelTearGasChoking(weaponID, responsiblePed) if (getPlayerWantedLevel(localPlayer) == 0 and weaponID == 17) then cancelEvent() end end addEventHandler("onClientPlayerChoke", localPlayer, cancelTearGasChoking)
-
Only wanted players will choke with this script. I suppose policemans wont be criminals too.
-
function cancelTearGasChoking(weaponID, responsiblePed) if (getPlayerWantedLevel(localPlayer) == 0 and weaponID == 17) then cancelEvent() end end addEventHandler("onClientPlayerChoke", cancelTearGasChoking)
-
But how do you define the wanted player? Do you use element data on him? Do you use setPlayerWantedLevel?
-
@maksam07, it's totally math. Look for codes on stackoverflow maybe.
-
How do you define the wanted player? Do you use setPlayerWantedLevel for it?
-
Use download priority. Search for it in this wiki page.
-
function addBindServer (player, commandName, theKey, theNewCommandToAddBind) local arguments = {1, 2, 3, 4} local theEK = bindKey (player, theKey, "down", theNewCommandToAddBind, unpack(arguments)) if theEK == true then outputChatBox(tostring(theEK)) else outputChatBox(tostring(theEK)) end end addCommandHandler("addBind", addBindServer) Try it like this.
-
How i can see client console script?
NeXuS™ replied to CITMartin's topic in Open Source Contributors
And as I just linked, it's hardcoded into the MTA client, maybe next time, check the link mate. -
Vehicles = {[468]=true,[577]=true} function enterVehicle ( player, seat, jacked ) if (Vehicles[getElementModel(source)]) then cancelEvent() warpPedIntoVehicle(player, source) outputChatBox( "OK!", player) end end addEventHandler("onVehicleStartEnter", root, enterVehicle) Next time, check the wiki page.
-
It wouldn't be such a good idea, use elementdata or accountdata, or at last, you can use a database.
-
What do you want to do with the player data?
-
You can't check the progress outside of the timer. Run your head through the code if you don't understand it totally. Progress_Window = {} function clientResourceStart( ) Progress_Window = guiCreateWindow(0.25, 0.9, 0.55, 0.05, "Testing Progress", true) guiWindowSetSizable(Progress_Window, false) guiSetProperty(Progress_Window, "CaptionColour", "FFFF0000") somebar = guiCreateProgressBar( 0.01, 0.4, 1, 1, true, Progress_Window ) if ( somebar ) then setProgress = setTimer(function() guiProgressBarSetProgress(somebar, progress+10) progress = guiProgressBarGetProgress(somebar) if (progress) >= (tonumber (100)) then guiSetProperty(Progress_Window, "CaptionColour", "FF00FF00") killTimer(setProgress) end end, 2000, 10) else outputChatBox ("Something went wrong!") end end addEventHandler( "onClientResourceStart", resourceRoot, clientResourceStart) --Sorted that Check this.
-
StartJobM = createMarker (-165.35049, 1059.69141, 18.74219, 'cylinder', 1.0, 22, 38, 199, 255) function StartJob (hitPlayer, matchingDimension) if isPedInVehicle (hitPlayer) then outputChatBox ("You can't hit marker when u are in vehicle!") elseif hitPlayer == localPlayer then triggerServerEvent("poj", localPlayer) outputChatBox("Created vehicle!") end end addEventHandler("onClientMarkerHit", StartJobM, StartJob) Next time, look at your code, it was totally wrong in all matter.
- 3 replies
-
- how trigger
- trigger veh
- (and 5 more)
-
Progress_Window = {} function clientResourceStart( ) Progress_Window = guiCreateWindow(0.25, 0.9, 0.55, 0.05, "Testing Progress", true) guiWindowSetSizable(Progress_Window, false) guiSetProperty(Progress_Window, "CaptionColour", "FFFF0000") somebar = guiCreateProgressBar( 0.01, 0.4, 1, 1, true, Progress_Window ) if ( somebar ) then progress = guiProgressBarGetProgress(somebar) else setProgress = setTimer(function() guiProgressBarSetProgress(somebar, progress+10) if (progress) >= (tonumber (100)) then guiSetProperty(Progress_Window, "CaptionColour", "FF00FF00") killTimer(setProgress) end end, 2000, 10) else outputChatBox ("Something went wrong!") end end addEventHandler( "onClientResourceStart", resourceRoot, clientResourceSt Try this one.
-
How i can see client console script?
NeXuS™ replied to CITMartin's topic in Open Source Contributors
As it is not a resource, look for the code in the source code. I think it's this one. -
How i can see client console script?
NeXuS™ replied to CITMartin's topic in Open Source Contributors
What do you want to do with the console? -
How i can see client console script?
NeXuS™ replied to CITMartin's topic in Open Source Contributors
What do you mean? -
Do you know that you can move the whole script on server-side?
- 3 replies
-
- how trigger
- trigger veh
- (and 5 more)
-
The one on top is the first element, the second is the first element's child etc.
-
You can use getElementChildren for this function.