-
Posts
1,546 -
Joined
-
Last visited
Everything posted by Dimos7
-
createObject -- find the model for c4 bomb setTimer -- put a timer to desotry the object createExplosion
-
I suggest you to make one table have all dataitem
-
You want it for gui text or something?
-
dxCreateTexture dxDrawImage dxCreateRenderTarget dxSetRenderTarget dxGetMaterialSize
-
guiSetText(GUIEditor.label[2],"Level ".. getElementData(localPlayer, "level")) Like this
- 1 reply
-
- 1
-
np ofc that is only for spawn at one hospital but you can do the same for other hospitals too
-
local Hospitals = {2034.9428710938,-1403.2003173828, 18, -2655.3991699219 ,638.16137695313, 15, -1514.6713867188 ,2522.4748535156, 56, 1607.62890625 , 1818.9958496094 , 11, -2198.5632324219, -2306.6220703125, 31, } function spawnNearHospital() for _, v in ipairs(Hospitals) do local x, y, z = getElementPosition(source) if getDistanceBetweenPoints3D(x, y, z, v[1], v[2], v[3]) < getDistanceBetweenPoints3D(x, y, z, v[4], v[5] , v[6]) < getDistanceBetweenPoints3D(x, y, z, v[7], v[8] , v[9]) < getDistanceBetweenPoints3D(x, y, z, v[10], v[11], v[12]) < getDistanceBetweenPoints3D(x, y, z, v[13], v[14], v[15]) then spawnPlayer(source, v[1], v[2], v[3]) end end end addEventHandler("onPlayerWasted", root, spawnNearHospital) something like this
-
as i tell you need a table with all hospital location that all
-
no i mean here
-
you can ask to your native language if you want more help
-
Well first create a table with all hospital locations then takes the location of player died and use to get where is closer take a loop for all hospitals and put > to check which is closer getDistanceBetweenPoints3D
-
Then i Guess you can use and take splane position dxDrawText getPedBonePosition
-
i guess with photoshop or something like this maybe
-
onMarkerHit 2 argument need the marker not player
-
For cj cloths and part use this dxCreateShader dxCreateTexture dxSetShaderValue engineApplyShaderToWorldTexture
-
Probelm with setVehicleEngine and SetVehicleLocked in OnVehicleExit
Dimos7 replied to Tony Brand's topic in Scripting
are you sure put it on server side? -
do something like this and onPlayerMessage to see if works
-
local blockedPlayers = {} function getPlayerFromPatrialName(name) local name = name and name:gsub("#%x%x%x%x%X%x", ""):lower() or nil if name then for _ , player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end addEventHandler("onClientMessage", root, function() if blockedPlayers[source] then cancelEvent() outputChatBox(getPlayerName(source).." wrote something in chat, but you block him!") end end ) function block(cmd, target) local targetPlayer = getPlayerFromPatrialName(target) if target and targetPlayer then if not blockedPlayers[targetPlayer] then blockedPlayers[targetPlayer] = true outputChatBox("player "..getPlayerName(targetPlayer).. " blocked") else blockedPlayers[targetPlayer] = nil outputChatBox("player ".. getPlayerName(targetPlayer).." unblocked") end else outputChatBox("Player not found!") end end addCommandHandler("block", block) <meta> <script src="namefile.lua" type="client"/> </meta>
-
i don't have such error myself
-
local blockedPlayers = {} function getPlayerFromPatrialName(name) local name = name and name:gsub("#%x%x%x%x%X%x", ""):lower() or nil if name then for _ , player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end addEventHandler("onClientMessage", root, function() if blockedPlayers[source] then cancelEvent() outputChatBox(getPlayerName(source).." wrote something in chat, but you block him!") end end ) function block(cmd, target) local targetPlayer = getPlayerFromPatrialName(target) if target and targetPlayer then if not blockedPlayers[targetPlayer] then blockedPlayer[targetPlayer] = true outputChatBox("player "..getPlayerName(targetPlayer).. "blocked") else blockedPlayers[targetPlayer] = nil outputChatBox("player ".. getPlayerName(targetPlayer).." unblocked") end else outputChatBox("Player not found!") end end addCommandHandler("block", block)
-
Probelm with setVehicleEngine and SetVehicleLocked in OnVehicleExit
Dimos7 replied to Tony Brand's topic in Scripting
Any errors or warnings in /debugscipt 3? -
wired you are sure have it in mtaa folder resource also trtied to restart the resource after change it?