itHyperoX
Members-
Posts
522 -
Joined
-
Last visited
-
Days Won
1
Everything posted by itHyperoX
-
Hi, i ran into a problem. local playerTimer = {} playerTimer[source] = setTimer(function() outputChatBox("Player "..getPlayerName(source).." has been unmuted.", root, 255, 0, 0) -- LINE 14 setMuted(source, false) end, duration*60000, 1) DEBUG: sourceS line 14 - Bad argument @ 'getPlayerName' [Expected element at argument 1, got nil] sourceS line 14 - attempt to concatenate a boolean value What's the problem?
-
Hi! I'm working on a cinema script, everything fine, but i don't know how to calculate the volume by distance. Anybody can help me please? local cinemax, cinemay, cinemaz = 0, 0, 0 local x, y, z = getElementPosition(localPlayer) local dis = getDistanceBetweenPoints3D(x, y, z, cinemax, cinemay, cinemaz) local volume = dis/2 -- Idk what to use setBrowserVolume(Screen,volume)
-
https://community.multitheftauto.com/index.php?p=resources&s=details&id=12699
-
You should use onPlayerQuit then use if isElement(vas1) then destroyElements(vas1) and addEventHandler("onResourceStart", resourceRootElement(getThisResource()), function() vas1 = createObject ( 3529, -2112.55103, -249.87376, 35.32031, 0, 0, 0 ) end)
-
Hi, is there any way to set the texts to center when using guiCreateMemo ?
-
as i said, i just want to hide this "scrolling bar"
-
with guiSetAlpha it's changing the panel too, i just want to hide that scroll thing.
-
Hi, is there any way to just hide this "scrolling" thing ?
-
but for position saving you can use setAccountData(account, "WWRPG.POS", toJSON({x, y, z})) --then use it local accData = getAccountData(account, "WWRPG.POS") local playerX, playerY, playerZ = unpack(fromJSON(accData))
-
if you want to create an object under player, yes you can x , y , z , you need to calculate the Z value
-
cuz setBlurLevel not working. Use https://wiki.multitheftauto.com/wiki/SetPlayerBlurLevel
-
local sec = 30 -- < you can always change this. just put the second here local sec_ = sec*1000 setTimer(function() removeEventHandler("onClientRender",getRootElement(),helpe) end, sec_ , 1)
-
Hiding the Background ()
-
Hi, is there any way to set the guiCreateGridList background to 0 ? I know there is a guiSetProperty, can anybody help me with that?
-
you should check this out: https://github.com/Dante383/custom-weapons
-
object = createObject(1337, 0, 0, 0) local x, y, z = getElementPosition(object) setObjectRotation(object, x, y, z) but you can use setElementRotation too.
-
Thank you.
-
Hi! I'm still learning mysql , and i started writing a vehicle system script. I stuck... I want to get that, is any vehicle already on that slot. How can i get that? I tried like 20 way, but just failed. I want something like this: I want to get is the player have vehicle on their Slot 1.. If yes, returning false. local result = (mysql:singleQuery("SELECT Slot=1 FROM vehicles WHERE VehicleOwnerAccountID=?", getElementData(source, "Player:AccountID"))) if tonumber(result) == 0 then local inserVehicle = mysql:execute("INSERT INTO vehicles (VehicleOwnerAccountID, Slot , VehicleID, Color, Plate, Spawned) VALUES (?, ?, ?, ?, ?, ?)", getElementData(source, "Player:AccountID"), 1, 411, 0, 0, 0) outputChatBox("ID:"..inserVehicle.VehicleDBID) mysql:singleQuery("UPDATE `accounts` SET `VehiclePerPlayerCount`=? WHERE `AccountID`=?", SlotQuery.VehiclePerPlayerCount + 1, getElementData(source, "Player:AccountID")) outputChatBox("Vehicle successfully inserted.", source) else outputChatBox("slot.") outputChatBox(tostring(result)) end
-
I'm sure this is not your code. If you don't know what you can use on server / client side, you can not make a moving spoiler script :).
-
local mycrpmpartner = {} function thePM(thePlayer,commandName,sendToName,...) local pmWords = { ... } local pmMessage = table.concat( pmWords, " " ) if sendToName then if getPlayerFromNamePart2(sendToName) then local toPlayer = getPlayerFromNamePart2(sendToName) if not (toPlayer == thePlayer) then --that () needed if getElementData(toPlayer, "Player:PMState") == true then outputChatBox("This player blocked the privat messages.", thePlayer) end if not (pmMessage == "") then outputChatBox("#757575[PM] Message to #ff00ff" .. getPlayerName(toPlayer) .. ":#ffffff " .. pmMessage, thePlayer, 255, 255, 255, true) outputChatBox("#FF0000[PM] Message from #ffFFff" .. getPlayerName(thePlayer) .. ":#ffff00 " .. pmMessage, toPlayer, 255, 255, 255, true) mycrpmpartner[thePlayer]=toPlayer mycrpmpartner[toPlayer]=thePlayer else outputChatBox("#FF0000[PM]Use:#ff9900 /pm [part of name] [message]", thePlayer, 255, 255, 255, true) end else outputChatBox("#FF000[PM] You cannot PM yourself #ff9900!", thePlayer, 255, 255, 255, true) end else outputChatBox("#FF0000[PM] Player not found! #FFFF00[#ff9900"..sendToName.."#FFFF00]", thePlayer, 255, 255, 255, true) end else outputChatBox("#FF0000[PM]Use:#ff9900 /pm [part of name] [message]", thePlayer, 255, 255, 255, true) end end addCommandHandler("pm", thePM) function getPlayerFromNamePart2 ( name ) 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 ( tostring ( name ):lower ( ), 1, true ) then return player end end end end addCommandHandler("blockpm", function(source) local PMState = getElementData(source, "Player:PMState") if (PMState == false) then setElementData(source, "Player:PMState", true) else setElementData(source, "Player:PMState", false) end end )
-
This is not your script.