Hero192
Members-
Posts
512 -
Joined
-
Last visited
Everything posted by Hero192
-
Hello, I have got a vps debian linux, but I have no idea how to add MTA into it and how to add resources..etc Please give me a hand, I am using puTTY SSH. Untill now I did this but I don't know the next things..
-
Well, I am a guy who cares alot about avoiding cpu usage, so yeah I wanted to be sure of one information since I didn't find it in the wiki. I had scripted a function and instead of re-scripting it in the whole gamemode resources, I used exports system to save some memory, But I am afraid if these exports might cause lags/CPU Usage or not. I just need a confirmation. ~Thanks in advance.
-
Hello comminity, today I face a small issue Since my whole server is based on MySQL & dbFunctions, I became interested of "debugdb" command & it's file. But, I when I type /debugdb 2 in server console F8, it says that the cmd is actived to level 2 but nothing appear, I have no idea when it appears the querie's action or something related to SQL & dbfunctions. Also, dbfile doesn't exist in logs folder. I hope you can tell me what can I do. Thanks in advance.
-
Hello dear scripters, How can I get player name from account name. Basically, for example we have account: johan12 I want to get his nick name from his account name. How can I do that ? because it's possible
-
Doesn't work, still return with the same result, that has returned from math.random to all peds. For more explanation, I want for each ped get his random job, so like that not all peds would be with the same job. Hope you can give me a hand
-
Hey Tox and thanks for the reply, How can I use it for example in my code?
-
It returns all strings who exist on the table , anyway? It's possible alot of servers do that, I want for each Ped get a random job name
-
Hello guys, I tried to make a random jobs shows in the GUI and be taken, but when I use math.random function it return just one result, so If I had 10Peds, it will returns with 10 Jobs with the same name not different, and I want it to be different. I tried that but failed, local jobtypes = {"Criminals", "Air Force", "Military", "Police"} local peds = { [createPed(0,2616.33, -1298.55, 14.23, 120)] = {0, 0}, [createPed(0,725.57, -1240.45, 13.53, 90)] = {0, 0}, } for ped, v in pairs(peds) do if ped then setElementData(ped,"jobPed",true) setElementData(ped,"jobnames",jobtypes[math.random(#jobtypes)]) setElementFrozen(ped, true) end end I hope you guys give a hand, and thanks
-
I want suggestions to make a proper inventory and ways, btw, I am using MySQL and your is with setAccountData
-
Hello guys, I want to make inventory system, using mysql and the inventory will have alot of items plus for each item's ammounts. and what I have scripted is will just save one item and its ammount any good ways or just suggestion to make a proper inventory?
-
why resourceRoot and I see most of scripters using root in this case , can you just explain that please?
-
Well, I am asking about these question because I feel kinda confiused of the usage of localPlayer / root in some cases For example: If I create a marker in server side and I did a trigger to client side, on addEventHandler should I use localPlayer or root, because the localPlayer who hit the marker and root who see the marker, or I am wrong? Here's the example code, correct me if I am wrong and tell me why , I really want to learn --Server side function onPlayerMarkerHit(player) if getElementType(player) == "player" then triggerClientEvent(player,"showGUI",player) end end addEventHandler("onMarkerHit", root, onPlayerMarkerHit) --Client Side: addEvent("showGUI",true) addEventHandler("showGUI", localPlayer, -- Just tell me if this line is correct? function() -- code end)
-
I mean, what's the difference if I created a GUI without defining it with a table, and without a table
-
Can any one explain that? I see alot of scripters create GUI elements and define them with a empty table, can I know why that? For example: local GUI = {} GUI["window"] = {} GUI["window"][1] = guiCreateWindow( ... ) Thanks in advance..
-
As the title says, how to make a high jump, which function can do that
-
Worked Thanks alot Bonus and Noki!!, Btw, is there anyway to create only one marker for each ped's position instead of all these markers in once I mean, When you aim on the ped and the ped is on dimension 2 & interior 5 then the marker will be created in 2 & 5, like that I'll avoid fps drop
-
Yes they're client sided, when I Aim on the ped all markers who are in the table getting created, not only one and when the marker getting robbed , I do if isElement(marker) then destroyElement(marker) end only one marker who be destroyed, others keep visible to the localPlayer and that's annoying. Any good solution @Bonus
-
Hello guys, I made a robsystem everything is fine but the rob system has a marker to rob it inside the store, when I aim on the ped, all of them being created in once and when I finish rob only one marker be deleted. local marker local robmarkers = { {379.07, -68.18, 1001.51, 0, 10}, {379.07, -68.18, 1001.51, 1, 10}, {379.07, -68.18, 1001.51, 2, 10}, {379.07, -68.18, 1001.51, 3, 10}, {379.07, -68.18, 1001.51, 4, 10}, {379.07, -68.18, 1001.51, 5, 10}, {379.07, -68.18, 1001.51, 6, 10}, {367.35, -6.57, 1001.85, 5, 9}, {367.35, -6.57, 1001.85, 6, 9}, {367.35, -6.57, 1001.85, 7, 9}, {367.35, -6.57, 1001.85, 8, 9}, {367.35, -6.57, 1001.85, 9, 9}, {367.35, -6.57, 1001.85, 10, 9}, {367.35, -6.57, 1001.85, 11, 9}, {372.34, -119.30, 1001.49, 1, 5}, {372.34, -119.30, 1001.49, 8, 5}, {372.34, -119.30, 1001.49, 9, 5}, {372.34, -119.30, 1001.49, 10, 5}, {372.34, -119.30, 1001.49, 11, 5} } addEvent("onCreateMarker",true) addEventHandler("onCreateMarker", root, function() setElementFrozen(client, false) showCursor(false) removeEventHandler("onClientRender", root, renderDistanceCheck) if isElement(marker) then destroyElement(marker) end for index, v in pairs(robmarkers) do marker = createMarker(v[1], v[2], v[3]-1, "cylinder", 1.5, 255, 0, 0, 210) if marker then setElementDimension(marker, v[4]) setElementInterior(marker, v[5]) addEventHandler("onClientMarkerHit", marker, onRobMarkerHit) end end end) Much thanks to who can help me
-
Working fine, thanks alot !! man for your time and your hard work I really appreciate that
-
I tried something like that, but not working, can you correct me please , thanks alot function targetPed(target) for ped ,v in pairs(peds) do if (ped == target) then return true end end end addEventHandler("onClientPlayerTarget", client, function (target) if (target) and (getElementType(target) == "ped") and storePed(target) and (source == client) then if isTimer(cooldown) then return end triggerServerEvent("onRob", client) setPedAnimation(target, "shop", "SHP_Rob_HandsUp", -1, false) cooldown = setTimer(function() end, 300000, 1) end end)
-
The loop worked thanks but I still facing my main problem, It gives the cash dirrectly on player leave the store, I don't know if I did something wrong in the loop function renderDistanceCheck () if ((not isPedDead(client)) and getElementInterior(client) == 0) then for ped, v in pairs (peds) do local ox, oy, oz = v[1], v[2], v[3] local x, y, z = getElementPosition(client) local dist = getDistanceBetweenPoints2D(ox, oy, x, y) if (dist >= 300) then triggerServerEvent("robstore:giveReward", client, client) addEventHandler("onClientRender", root, render) removeEventHandler ("onClientRender", root, renderDistanceCheck) setTimer(function() removeEventHandler("onClientRender", root, render) end, 5000,1) end end end end I hope you can solve this and thanks again @Bonus for the hard work
-
How, I don't know how to deal with this kind of table and thanks !! alot bonus
-
Why this won't be loaded? local peds = { [createPed(205, 376.51, -65.84, 1001.50, 180)] = {1199.13, -918.07, 43.12, 1, 10}, [createPed(205, 376.51, -65.84, 1001.50, 180)] = {-1912.27, 828.02, 35.21, 2, 10}, [createPed(205, 376.51, -65.84, 1001.50, 180)] = {-2336.94, -166.64, 35.55, 3, 10}, } addEventHandler("onClientResourceStart", resourceRoot, function () if peds[ped] then setElementFrozen(peds[ped], true) setElementInterior(peds[ped], peds[ped][5]) setElementDimension(peds[ped], peds[ped][4]) end end)