-
Posts
1,312 -
Joined
-
Last visited
Everything posted by KariiiM
-
I wasn't using notePad plus writing in a fast mood, I didn't re read what I wrote thanks for caring
-
Use, onClientPlayerDamage cancelEvent() getElementModel
-
Simply you've to make a check, local x,y,z = getElementPosition(localPlayer) local cityname = getZoneName ( x, y, z, true) if (cityname == Los Santos) then --[Your code] end
-
This function do that SetWeaponProperty set the property as damage like in bestkiller's example. Also, make sure to set weaponSkill for "pro", "std" or "poor"
-
onClientPlayerDamage cancelEvent()
-
function hack () if antispam == true then setElementFrozen(localPlayer,true) setPedAnimation(localPlayer,"ROB_BANK","CAT_Safe_Open") setTimer(setPedAnimation,3000,1,localPlayer,false) setTimer(setElementFrozen,3000,1,localPlayer,false) showCursor(false) triggerServerEvent ( "give", localPlayer ) antispam = false time = setTimer(function() antispam = true end,180000,1) else if antispam == false then getTime= getTimerDetails(time) exports.SAEGMessages:sendClientMessage("You must to wait "..math.floor(getTime/1000).."scounds to hack again",source,255,0,0) end end end
-
You're welcome also use dbPoll to return the result
-
We don't loop data from a table by using dbExec, Use dbQuery instead.
-
Also, PHP code must be scripted in server side.
-
No, you can't do that as I see the types which contains gang,squade..etc aren't finished with scripting, so there's no way to do that untill you finish the code.
-
What do you mean by gang? because what he did is correct and should works
-
Use this function to check if the element "marker" is attached or else if (isElementAttached(vehMarker)) then toggleControl(hitElement, "enter_exit", false) bindKey(hitElement, "f", "down", funcName) end and get the funcName from bind like that, if that what you means function funcName() --[[your code.]] end full code setTimer(function () vehicles = getElementsByType ("vehicle") for key,vehicle in ipairs(vehicles) do if not (getElementData(vehicle, "marker")) then local x, y, z = getElementPosition(vehicle) vehMarker = createMarker(x, y, z, "cylinder", 2.0, 255, 0, 0, 255) attachElements(vehMarker, vehicle, 0, -3, -1) setElementData(vehicle, "marker", vehMarker) addEventHandler("onMarkerHit", vehMarker, function(hitElement) if (getElementType(hitElement) == "player") then if (isElementAttached(vehMarker)) then toggleControl(hitElement, "enter_exit", false) bindKey(hitElement, "f", "down", funcName) end end end) addEventHandler("onMarkerLeave", vehMarker, function(hitElement) if (getElementType(hitElement) == "player") then if (isElementAttached(vehMarker)) then toggleControl(hitElement, "enter_exit", true) unbindKey(hitElement, "f", "down", funcName) end end end) end end end, 6000, 0) function funcName() --[[your code.]] end
-
Ah Do you want to get the funcName of all this code? to put it in somewhere?
-
Working I tested it by myself, local vehMarker = {} setTimer(function () for index, vehicle in pairs (getElementsByType("vehicle")) do if not (getElementData(vehicle, "marker")) then local x, y, z = getElementPosition(vehicle) vehMarker[vehicle] = createMarker(x, y, z, "cylinder", 2.0, 255, 0, 0, 255) attachElements(vehMarker[vehicle], vehicle, 0, -3, -1) setElementData(vehicle, "marker", vehMarker[vehicle]) addEventHandler("onMarkerHit", vehMarker[vehicle], function(hitElement) if (getElementType(hitElement) == "player") then toggleControl(hitElement, "enter_exit", false) bindKey(hitElement, "f", "down", funcName) end end) addEventHandler("onMarkerLeave", vehMarker[vehicle], function(hitElement) if (getElementType(hitElement) == "player") then toggleControl(hitElement, "enter_exit", true) unbindKey(hitElement, "f", "down", funcName) end end) end end end, 6000, 0)
-
Example: this example will create a table when the resource start. addEventHandler ("onResourceStart", resourceRoot, function () dbExec ( connection,"CREATE TABLE IF NOT EXISTS myTable (column1 TEXT, column2 INT)" ) end) Also, read the link that tosfera posted for you to learn more about SQL, and try to practice that on dbFunctions.
-
XML is the easy way, just try it
-
I have no idea about your group system export or elementData to check with.
-
Make it server sided better addEventHandler("onPlayerChangeNick", getRootElement(), function(oldNick, newNick) if (newNick) then outputChatBox(""..oldNick.." --> "..newNick.."",getRootElement(), 255, 100, 100, true) if (not fileExists("logs/logs.log")) then local logFile = fileOpen("logs/logs.log") if (logFile) then local size = fileGetSize(logFile) fileSetPos(logFile, size) fileWrite(logFile, ""..oldNick.." --> "..newNick.."") fileClose(logFile) end end end end)
-
Post a full code and re-explain your code situation.
-
local pizza = {} function PutBoxOnHand() pizza[source] = createObject ( 1271, 0, 0, 0 ) exports.bone_attach:attachElementToBone(pizza[source],source,12,0.081,0.05,0.01,0,-70,0) end addEvent("PutBoxOnHand", true) addEventHandler("PutBoxOnHand", root, PutBoxOnHand) function removeBoxFromHands () if pizza[source] and isElement(pizza[source]) then destroyElement(pizza[source]) pizza[source] = nil end end addEvent("removeBoxHands", true) addEventHandler("removeBoxHands", getRootElement(),removeBoxFromHands)
-
You're welcome and anytime
-
Good news
-
Try that and tell me if there's any error local tank = {} function PutBoxOnHand() local x, y, z = getElementPosition ( source ) --Get the players position tank[source] = createObject ( 1220, x, y, z + 5 ) --Create a tank attachElements ( tank[source], source, 0, 0, -1 ) --Attach the tank to the player. end addEvent("PutBoxOnHand", true) addEventHandler("PutBoxOnHand", getRootElement(),PutBoxOnHand) function removeBoxFromHands () if tank[source] and isElement(tank[source]) then destroyElement(tank[source]) tank[source] = nil end end addEvent("removeBoxHands", true) addEventHandler("removeBoxHands", getRootElement(),removeBoxFromHands)
