-
Posts
1,283 -
Joined
-
Last visited
Everything posted by manve1
-
How can i make a script to get a specific vehicle that was created? EDIT: Like if i made a vehicle using this function: local monsterNot = createVehicle( 411, 0, 0, 1 ) How can i make like that some other function would work only for this vehicle, for example: if i was going to do a marker hit, it would work only for this vehicle, not the rest not even with same id.
-
viewtopic.php?f=91&t=26541 After All ... read other posts before posting it your by your self .. Lots of people don't waste time making scripts for other ( some even if payed for the job ), they might be learning it by them self and improving or just already making a some kind of server or script.
-
Worked, just for the marker had to change "source" to the name of the marker, don't know why, but worked fine thanx
-
sorry uhm, i don't get your script, but this is how mine looks ( just a small piece ): local guiFinnish = guiCreateWindow( 0.25, 0.3, 0.5, 0.3, 'Quit Job', true ) local markerFinnishJob = createMarker( 321, 874, 19.3, 'cylinder', 2.0, 255, 255, 0, 170 ) addEventHandler('onClientMarkerHit', markerFinnishJob, function() guiSetVisible( guiFinnish, true ) showCursor( true ) end, false )
-
how could i use "getElementPosition" to fix my problem?
-
Would there be a way to make that if a player goes a lot higher then the marker is, he wouldn't get the function for example like a GUI shown if it is created that when u hit the marker u get a gui shown ---------------------------------- --Better explanation i think-- ---------------------------------- I have a problem, when i don't hit the marker ( cylinder ) i just go flying through the top of it, i get a gui visible ( which i only want to make like if you hit the marker ) P.s. Its a cylinder, and i only want to know if it is possible to make that when the original cylinder is hit ( colored bit ) you get the gui visible, not when in mid air.
-
coke = engineLoadTXD ( "vehicles/train.txd" ) engineImportTXD ( coke, 515 )
-
Java SDK for MTA is an MTA module. Perhaps don't post if you don't even know. so its LUA and JAVA??
-
setTimer( function (player,cmd,...) local text = table.concat({...}, " ") local nick=getPlayerName(player) if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "lvl 5" ) ) then triggerClientEvent(getRootElement(),"doOutput",getRootElement(),255,255,255,"United States Roleplay") end end, 100000, 0 --[[ change the 100000 to the time you want ( minimum 50 milliseconds ... p.s. this is in milliseconds ) ]]-- )
-
this forum is for MTA RELATED scripts (( I think )) EDIT: You most probably haven't declared: socket_create
-
I'm trying to make like when a person presses on vehicle called "Dune" he gets an output. local guiVehicle = guiCreateWindow( 0.3, 0.2, 0.4, 0.6, 'Vehicles', true ) local gridVehicles = guiCreateGridList( 0.05, 0.1, 0.5, 0.825, true, guiVehicle ) addEventHandler('onClientResourceStart', resourceRoot, function() local hColumn = guiGridListAddColumn( gridVehicles, 'Vehicles', 0.85 ) if ( hColumn ) then local hRow = guiGridListAddRow( gridVehicles ) local dune = guiGridListSetItemText ( gridVehicles, hRow, hColumn, 'Dune', false, false ) addEventHandler('onClientGUIClick', gridVehicles, function() if ( guiGridListGetSelectedItem ( gridVehicles ) == 'Dune' ) then outputChatBox( 'You pressed on dune.', 255, 255, 255 ) end end ) end end ) The problem is, i can't really work out how to make it.
-
No point of asking for a scriptor if you haven't read what other people replied to people that already asked for a free scriptor
-
You haven't declared getActivePlayers() so the script doesn't know what you are trying to do
-
Hmm... But on some of my client scripts i had to use: if (localPlayer == p) then so it doesn't mess up with other people, Still, thanx, I'll keep that in mind
-
I have got a slight one of the annoying problems when you can't find problem in the script. My problem is when i click button "close" it doesn't close. gui = guiCreateWindow( 0.3, 0.2, 0.4, 0.6, 'Da window', true ) close = guiCreateButton( 0.1, 0.75, 0.8, 0.15, 'Close', true, gui ) addEventHandler('onClientGUIClick', close, function( p ) if ( localPlayer == p ) then guiSetVisible( gui, false ) showCursor( false ) end end, false ) NOTE: By my knowledge using 'if ( localPlayer == p ) then' it will make it work only to the person who clicked the button.
-
I had same problem robbster, so you should check other posts too ...
-
When i try to repair my car, it doesn't work, it set my vehicles health to 1000, but still it stay's the blown up tires ect .. as non-repaired cash = getPlayerMoney( localPlayer ) addEventHandler('onClientGUIClick', repairCar, function() if cash >= 150 then local playerVehicleHealth = getPlayerOccupiedVehicle ( localPlayer ) takePlayerMoney( 150 ) setElementHealth( playerVehicleHealth, 1000 ) end end, false )
-
Not sure how to make it .. because there isn't a proper set timer, with : setTimer
-
What you mean?? If you want to respawn someone after death use: spawnPlayer --or setElementPosition
-
to stop timer use killTimer EDIT: There is nothing wrong, i think Btw, here is an example for stopping timer: timerDie = setTimer( function() outputChatBox( 'Trololo', 255, 0, 255 ) end, 5000, 1 ) function KillTheTimer() killTimer( timerDie ) end addCommandHandler('killThatTimer', KillTheTimer)
-
screenX,screenY = guiGetScreenSize() function startTheClock () if not systemUpTime then systemUpTime = getTickCount () end currentCount = getTickCount () addEventHandler ( "onClientRender", root, function() dxDrawRectangle (screenX *.40, screenY * .09, 250, 50, tocolor(0,0,0,150)) dxDrawText ( currentCount - systemUpTime, screenX * .48, screenY * .1, screenX, screenY, tocolor(255,255,255), 2) end ) end addCommandHandler("clock", startTheClock) startTheClock()
