
Anubhav
Members-
Posts
2,277 -
Joined
-
Last visited
Everything posted by Anubhav
-
You probably are looking for onMarkerHit
-
MTAdiag link: https://pastebin.mtasa.com/118698717 My MTA:SA crashes after download (not the map one). Then there is no crash report or anything. I can connect to my server perfectly tho
-
A BIG difference: You can actually move your .db files for SQLite for specific data (if you make different .db files for 90% of things). However, if you copy the file of server's SQL, your some accounts may be removed and be added. I prefer SQL also because it's easy to use. Account data is not my style.
-
Solved. Somehow it started working! thanks everyone
-
function disableReconnect(cmd) if (cmd == "reconnect") then cancelEvent() end end addEventHandler("onPlayerCommand", root, disableReconnect) Is this what you are looking for? This disables reconnect (I din't test it, but should work!).
-
Possibly your 2nd argument was wrong. You are supposed to write 1, 2 or 3 (see the wiki getElementSpeed).
-
what do you mean? have you even tried seeing the post? i have done that. setText!!!!
-
They are valid strings. I have taken them from SQLite database which have columns Rank TEXT and Players TEXT. I have tried to output it too, it worked. But not in guiSetText. There's no error either!!!!
-
actually i dont want a font and according to wiki you dont need a font. It has worked many times before using fonts in other of my resources.
-
kya aap bata sakte ho kisko ghostmode karna hein.etc <a href=\"https://wiki.multitheftauto.com/wiki/SetElementCollidableWith\" rel=\"external nofollow\">https://wiki.multitheftauto.com/wiki/SetElementCollidableWith</a> ye function appko mada karega, aap apni script try kijaya aur fir wapis puchiye agar koy gadbhad hein!
-
kya aap bata sakte ho aap ne zombies aur wo dusri script kaha se download ki jese ki mein help kar saku!
-
then make it alive again? cmon kuch to ker apni desh ke forum ke liye!
-
maaf kardo. aap ko ka tag use karna chahiya! [lua] function sound() sound = playSound3D("http://tuner.hit104.com/", 2843.8999023438, -1664, -45.400001525879, true) end addEventHandler("onClientResourceStart", resourceRoot, sound) PlaySound3D is what you need to work it out!
-
Wrong wrong. setClipboard is a client sided function. On top of that you are using client sided outputChatBox and server sided outputChatBox. You have to trigger a event from a server side to client side. triggerClientEvent. GL fixing it!
-
ok I was making a login GUI with tabs and some memo in it. I have 2 client files: gui.lua client_handler.lua gui.lua loads first and has the memo GUIEditor.memo[2] = guiCreateMemo(0, 0, 806, 535, "", false, GUIEditor.tab[3]) guiMemoSetReadOnly(GUIEditor.memo[2], true) but now I want to set the text of the memo in client_handler.lua, I get no error and it's still blank. ( I have outputted the text and it seemed fine. The text was pretty long. function guiSetStaffList( list ) local setText = "" local timesDone = 0 for i,v in ipairs( list ) do if timesDone == 0 then setText = v.Rank..": "..v.Players timesDone = timesDone + 1 else setText = setText.."\n\n\n\n"..v.Rank..": "..v.Players timesDone = timesDone + 1 end end guiSetText(GUIEditor.memo[2], setText ) end . I have tried outputting setText, it WORKS VERY FINE with outputChatBox but why isn't the text set. I also tried setting it in gui.lua by calling function FROM client_handler.lua but it still din't work!
-
Citys = {} markerPizza = createMarker( 2485.0024414063, 2022.3449707031, 9.8203125, "cylinder", 1.5, 255, 180, 0, 100) blipPizza = createBlipAttachedTo( markerPizza, 14, 2, 255, 255, 0, 255 ) Citys["Los Santos"] = { {x=2382.4638671875, y=-1891.9400634766, z=13.38914680481}, } Citys["San Fierro"] = { {x=-2686.283203125, y=270.83374023438, z=4.3359375}, } Citys["Las Venturas"] = { {x=2445.8454589844, y=2020.6320800781, z=10.8203125}, } function onPizzaMarkerHit(hitPlayer) local xx, yy, zz = getElementPosition ( localPlayer ) local city = getZoneName(xx, yy, zz, true) local x, y, z = Citys[city].x, Cityw[city].y, Citys[city].z local marker = createMarker(x, y, z, "cylinder", 2, 255, 188, 0) local blip = createBlip(x, y, z, 24, 1) if isElement(markerPizza) then destroyElement(markerPizza) end if isElement(blipPizza) then destroyElement(blipPizza) end addEventHandler("onClientMarkerHit", marker, function() fadeCamera(false) setTimer(fadeCamera, 2000, 1, true) triggerServerEvent("EndJob", localPlayer, localPlayer, elements) end) end addEventHandler("onClientMarkerHit", markerPizza, onPizzaMarkerHit)
-
Use triggerClientEvent constantly? Use element data and get it at client side?
-
fileExists at client side maybe?
-
Are you asking this? function wantedlevelstuff (player) local policeTeam = getTeamFromName("Police") local militaryTeam = getTeamFromName("Military") if getPlayerTeam( player ) == policeTeam or getPlayerTeam( player ) == militaryTeam then outputChatBox ( "Look for the yellow moving blips on map.", player ) local playersa = getElementsByType ( "player" ) for theKey,thePlayera in ipairs(playersa) do local levela = getPlayerWantedLevel ( thePlayera ) if ( levela > 0 ) then local wantedBlip = createBlipAttachedTo ( thePlayera, 56 ) setElementVisibleTo ( wantedBlip, root, false ) setElementVisibleTo ( wantedBlip, player, true ) end end end end This checks if the player is in Police or Military team then continues. You overwrote variables so it made it confusing. Then I maade it available only to police!
-
Or better start freeroam. In freeroam go where you want the object. Use /getpos Get the X,Y,Z and put it instead of 0,0,0 or 0,0,4.
-
See their test-servers, maybe it helps you out to see the performance and more things. I suggest Vortex Servers EDIT: Forgot about mentioning why. I have used them, they work so nice. They also replied to tickets fast.
-
Show the full script maybe, and are there errors/warnings in /debugscript 3
-
You need to have proper position for your object. 0, 0, 0 is underground position, 0,0,4 is the top one. You used thePlayer in takePlayerMoney. Replace it by localPlayer