1LoL1
-
Posts
944 -
Joined
-
Last visited
Posts posted by 1LoL1
-
-
Anyone can but sure not free.
-
client-side = blip createBlip ( float x, float y, float z [, int icon = 0, int size = 2, int r = 255, int g = 0, int b = 0, int a = 255, int ordering = 0, float visibleDistance = 99999.0 ] ) server-side = blip createBlip ( float x, float y, float z [, int icon = 0, int size = 2, int r = 255, int g = 0, int b = 0, int a = 255, int ordering = 0, float visibleDistance = 99999.0, visibleTo = getRootElement( ) ] )
-
3 hours ago, Tycka said:
Hello, for example I have function like this:
function HP ( )setElementData(source, "HP", 100)end addEvent( "HP", true )addEventHandler( "HP", getRootElement(),HP )
How to make that after this function is used, next time it can be used after 15minutes? (For every player individually)
function HP () setElementData(source, "HP", 100) end addEvent("HP", true) addEventHandler("HP", getRootElement(), HP) setTimer(HP, 900000, 0)
or
addEvent("HP", true) addEventHandler("HP", getRootElement(), function () setTimer(function() setElementData(source, "HP", 100) end, 900000, 0) end)
But if you want to health then use "setElementHealth"
-
local hillAreaLS = createColRectangle ( -164.82, -2912.12, 65.28, 3150, 2300 ) function hill_EnterLS (plr) if (getElementType(plr) == "player") then triggerClientEvent ( plr, "SAEGGroups:Kills", plr ) end addEventHandler ( "onColShapeHit", hillAreaLS, hill_EnterLS ) function hill_LeaveLS (plr) if (getElementType(plr) == "player") then triggerClientEvent ( plr, "SAEGGroups:KillsHide", plr ) end end addEventHandler ( "onColShapeLeave", hillAreaLS, hill_LeaveLS )
-
add one end in Enter colshape.
-
Error/Warning?
-
You mean stealth kill? if yes then use https://wiki.multitheftauto.com/wiki/OnPlayerStealthKill
-
Use guiCreateScrollPane.
-
12 hours ago, HurT said:
Never mind.
I noticed that you know it but you don't want to say.
Replace.
-
1. [admin] --> admin --> server.lua --> admin_server.lua:
mdata = reason~="" and ( "" .. reason .. "" ) or "" to mdata = reason~="" and ( "(" .. reason .. ")" ) or ""
2. [admin] --> admin --> conf --> messages.xml
<all>$player has been muted for $data2 $data</all>
-
11 hours ago, bLack-ouT said:
Verme şansı varmı kardeşim.
This is english only section.
-
You can search here: https://community.multitheftauto.com/index.php?p=resources
-
1 hour ago, kevi1443 said:
How did you fix it?
Add the resource in acl.xml
<object name="resource.<resourcename>" ></object>
-
Wrong section. What do you have in meta.xml?
<script src="file.lua" type="server"/>
or
<script src="file.lua" type="client"/> -- This is client-side
?
If file.lua have in meta "client" then paste your code and use /restart <resource>
-
fadeCamera()
- 1
-
Try this one:
addEventHandler("onClientRender",root,function() for _,phone in ipairs(getElementsByType("Object")) do if (getObjectModel(phone) == 1216) or (getObjectModel(phone) == 1363) then local x,y,z = getElementPosition(getLocalPlayer()) local vx,vy,vz = getElementPosition(phone) if (getDistanceBetweenPoints3D(x,y,z,vx,vy,vz) <= 4) then dxDrawLine(18 - 1, 536, 286, 536, tocolor(0, 0, 0, 254), 1, false) dxDrawLine(286, 536, 286, 479 - 1, tocolor(0, 0, 0, 254), 1, false) dxDrawRectangle(18, 479, 268, 57, tocolor(0, 0, 16, 238), false) dxDrawImage(28, 487, 44, 39, "images/phone.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("Press E to use the phone.", 78, 487, 276, 526, tocolor(236, 233, 0, 254), 0.45, "bankgothic", "center", "center", false, false, false, false, false) end end end end end)
Make sure that the phones are added by script or .map file
But by doing this
for _,phone in ipairs(getElementsByType("Object")) do if (getObjectModel(phone) == 1216) or (getObjectModel(phone) == 1363) then
it grabs all of the phone OBJECTS in the map, whether they are added by map, script or not added at all.. The script doesn't work yet
Look what Wumbaloo said..
for _,phone in ipairs(getElementsByType("object")) do
and use
getElementModel() not getObjectModel()
-
Error/warning?
function met (source) if hasObjectPermissionTo(source, "function.kickPlayer") then triggerClientEvent(source, "szvzas", getRootElement()) end end addCommandHandler("k",met) function valaszok (source) --if hasObjectPermissionTo(source, "function.kickPlayer") then triggerClientEvent(source, "valaszok", getRootElement()) end --end
-
Error with all bone id's on CJ?
Yes with all.
-
Google told me:
"If you get 1.#IND or nan, look for illegal operations."
Seems like 1.#IND and 1.#QNAN are similar.
You can test with debugscript every variable.
So you could see which of these variables cause the problem.
So how i can fix?
-
Ok so it seams objx,objy,objz are all equal to -1.#IND ?
I don't know what do you mean.. i only get this info when i put in line 77...
-
"Put this code before the lines which let you get the warnings:"
BEFORE, not after ...
Sorry..
INFO: -1.#IND--1.#IND-- | -1.#IND-1.#QNAN-1.#QNAN
-
Can you please show me where you put the line?
setElementPosition(element,objx,objy,objz) setElementRotation(element,offrx,offry,offrz,"ZXY") if ( not tonumber ( tostring ( objx ) ) or not tonumber ( tostring ( objy ) ) or not tonumber ( tostring ( objz ) ) ) then return end if ( not tonumber ( tostring ( offrx ) ) or not tonumber ( tostring ( offry ) ) or not tonumber ( tostring(offrz ) ) ) then return end outputDebugString ( tostring (objx).."-"..tostring(objy).."-"..tostring(objz).." | "..tostring(offrx).."-"..tostring(offry).."-"..tostring(offrz) ) else setElementPosition(element,getElementPosition(ped)) end end end addEventHandler("onClientPreRender", getRootElement(), putAttachedElementsOnBones)
-
...
Again:
Put this code before the lines which let you get the warnings:
outputDebugString ( tostring (objx).."-"..tostring(objy).."-"..tostring(objz).." | "..tostring(offrx).."-"..tostring(offry).."-"..tostring(offrz) )
Then try to get the warning again.
If you get the warning look at the output 1 line BEFORE the warning.
What is written there?
-
When you get the warning, what is the output before the two warnings?
When i use skin ID 0 then i get warnings..
When i use others skins i get green INFO: objx, ojby, objz, offrx, offry, offrz (numbers)
Error: Attempt to perform arithmetic on local value <a nil value>
in Scripting
Posted
Post full function.