-
Posts
80 -
Joined
-
Last visited
Everything posted by Motar2k
-
~= means different from if is a condition if player ~= localPlayer then means If the player is different from localPlayer If you need help, don't hesitate to send me a message
-
@Artyom888 for i, player in ipairs(getElementsByType("player")) do --player - localPlayer if player ~= localPlayer then table.insert(playersList, player) end end
-
So that problem doesn't have to happen. Try changing the name of the variables and change the size of marker or add more Z position, Apparently it does not detect the collision
-
@hackermagus You have other function called MarketHit?
-
You need to declare the table in which you will store the data. interiors = {}
-
Merry Christmas and happy new year everyone
-
@slapz0r Check this https://community.multitheftauto.com/index.php?p=resources&s=details&id=11231
-
https://community.multitheftauto.com/?p=resources&s=details&id=16529 Text animation Point animation Wordrap
-
What is wrong with my script? I'd like my ped to rotate but it doesn't..
Motar2k replied to bencskrisz's topic in Scripting
I don't see any errors. Try this setElementRotation(NCP,0,0,rotZ+10) -
local NPC = createPed(124,0,0,5) local screenWidth, screenHeight = guiGetScreenSize() local range = 15 function NPCnametag() local x,y,z = getPedBonePosition(NPC,6) local px,py,pz = getElementPosition(localPlayer) if getDistanceBetweenPoints3D(x,y,z,px,py,pz) <= range then local sx,sy = getScreenFromWorldPosition(x,y,z) if sx then dxDrawText("Bob",sx,sy,sx,sy,tocolor ( 255, 255, 0, 255 ), 2,"sans") end end end function HandleTheRendering() addEventHandler("onClientRender",getRootElement(), NPCnametag) end addEventHandler("onClientResourceStart",resourceRoot, HandleTheRendering)
-
Try this local NPC = createPed(124,0,0,5) local screenWidth, screenHeight = guiGetScreenSize() function NPCnametag() local x,y,z = getPedBonePosition(NPC,6) local sx,sy = getScreenFromWorldPosition(x,y,z) if sx then dxDrawText("Bob",sx,sy,sx,sy,tocolor ( 255, 255, 0, 255 ), 2,"sans") end end function HandleTheRendering() addEventHandler("onClientRender",getRootElement(), NPCnametag) end addEventHandler("onClientResourceStart",resourceRoot, HandleTheRendering)
-
@djantony Muchos de los robos son creados por diferentes personas, por lo tanto las estructuras de estos resources suelen ser diferentes. Antes de crear un sistema de robo te recomiendo hacer sistemas mas básicos para ir desarrollando tus habilidades como scripter, si gustas mandarme un mensaje privado para ayudarte. Mi discord: Armisael_#1719
-
setTimer( function() SortPlayerVehiclesID(thePlayer) end, 7000, 1) else outputChatBox("#ff0000Shoma Dar Hale Hazer "..tostring(getElementData(root,"carsnumber")).." Mashin Darid!", root, 255, 255, 255, true) setElementData(root,"carsnumber",nil) end else outputChatBox("#ff0000Shoma Poole Kafi Nadarid!", root, 255, 255, 255, true) end end
-
Paste the line 397 @TheMta
-
Use this before line 359 if tonumber(getElementData(root,"carsnumber")) and tonumber(getElementData(accSys:getPlayerAcc(root), "pSlot")) then This verifies if the 2 values to compare are numbers
-
The bug occurs when logging in or disconnecting? @DiGiTal
-
function getFrontPosition(element,dist) local x, y, z = getElementPosition(element) local _,_,r = getElementRotation(element) local tx = x + - ( dist ) * math.sin( math.rad( r ) ) local ty = y + dist * math.cos( math.rad( r ) ) local tz = z return tx,ty,tz end
-
I didn't see anything abnormal in the code, you probably got confused with the name of the data in some other resource. Traslated by google
-
It's possible get the firetruck vehicle turret target?
-
are you doing in relative position and size?