-
Posts
6,097 -
Joined
-
Last visited
-
Days Won
218
Everything posted by IIYAMA
-
I think he means this. local counter = 1 function test() sound = playSound("playerpics/song.mp3") setTimer(function() counter = getSoundBPM() end, 50, 0) addEventHandler("onClientRender", root, bpmCounterDX) end addCommandHandler("testbpm", test) function bpmCounterDX() dxDrawRectangle(1062, 484, 15, 112/1000*counter, tocolor(184, 1, 5, 255), true) dxDrawRectangle(1099, 484, 15, 112/1000*counter, tocolor(156, 20, 161, 255), true) dxDrawRectangle(1135, 484, 15, 112/1000*counter, tocolor(7, 161, 175, 255), true) dxDrawRectangle(1173, 484, 15, 112/1000*counter, tocolor(172, 178, 5, 255), true) dxDrawRectangle(1209, 484, 15, 112/1000*counter, tocolor(7, 182, 2, 255), true) end
-
setAccountData(playerAccount,"xp",(getAccountData(playerAccount,"xp") or 0)+133)
-
May I ask, how can you login manually before you join?......... isGuestAccount(playerAccount,source,false) if isGuestAccount(playerAccount) then if not isGuestAccount(playerAccount) then
-
setPedHeadless(killer, true) setPedHeadless(source, true) For the rest debug the code manually, because it has to work.
-
dxDrawText You should read better, all the information is on the wiki.
-
Some servers are binding it, just make sure you unbind it after leaving the servers. There is no other solution I think.
-
and remove/disable: addEventHandler("onPlayerCommand",root,setAdminTeam) You don't need that.
-
https://wiki.multitheftauto.com/wiki/FileGetSize and start writing after that.
-
Ligt er maar net aan of je webserver goed werkt. Ja.
-
Serverside: Events: "onPlayerWasted" Functions: getElementPosition getElementRotation createPed killPed and maybe for removing the peds after a while: setTimer getTickCount() destroyElement
-
if (getGuestAccount [source,playerAccount,"player.guest",playerSerial] ) then Makes no sense. I have no idea what you are trying to accomplish.
-
A table. local buttonDataTable = {} function showMissionWindow(who, value1, value2) --window showing and other :~ here gui["przyjmijMisje"] = guiCreateButton(10, 205, 111, 23, "Take mission", false, gui["glowne"]) addEventHandler( "onClientGUIClick", gui["przyjmijMisje"], supkaFunkcja) buttonDataTable[ gui["przyjmijMisje"] ]= {value1, value2} -- store end function supkaFunkcja(button, state, absoluteX, absoluteY) local buttonData = buttonDataTable[source] -- request if buttonData then -- check outputChatBox(tostring(buttonData[1]) .. " " .. tostring(buttonData[2])) -- showing value1 and value2 var from showMissionWindow end end
-
Exactly, >> only that resource can edit it <<, but that isn't admin isn't it? Only the script it self can edit the setting. By using: https://wiki.multitheftauto.com/wiki/Set
-
What I am trying to show you, is how you can communicate with the server. Isn't that what you want? Knowing if a player is muted or unmuted so you can show the right button? What I have written is designed to request information(muted/unmuted) from the server and send it back to the client who asked for it. Also I added a function which can mute/unmute a player when you press one of those buttons. But what triggers the function: unmute_players ? You don't check if that player does exist that has been given by getPlayerFromName, which will give some warnings. Also source can be a button = onClientGUIClick or a player = triggering, it will not work you have to put some functions in between making sure all data is correct. Also clientside only elements can't switch from side. This code is more complicated then the lines you already have written yet. You can better know then thinking you know, test your variables is a good start. I hope my information can help you further.
-
Well this is what you need: To get the size of the object: https://wiki.multitheftauto.com/wiki/Ge ... oundingBox To check where the ground is: https://wiki.multitheftauto.com/wiki/ProcessLineOfSight And of course you need a lot of matrix or trigonometric functions, which I unfortunately do not know to much of.
-
This is how it can be done. You have to merge it with your button script and set up your buttons. Good luck. server addEvent("check_player_mute", true) addEventHandler("check_player_mute", root, function (playerName) if isElement(source) then local targetPlayer = getPlayerFromName ( playerName ) if targetPlayer then triggerClientEvent(source,"playerMuteStatus",targetPlayer, isPlayerMuted (targetPlayer),playerName) end end end) addEvent("mutePlayer",true) addEventHandler("mutePlayer",root, function(status) if isElement(source) and isElement(client) then setPlayerMuted (source,status) outputChatBox("You have been muted by IIYAMA....",source,255,0,0) end end) client addCommandHandler("checkmute", function(CMD,name) triggerServerEvent("check_player_mute",localPlayer,name) end) addEvent("playerMuteStatus",true) addEventHandler("playerMuteStatus",root, function (muteStatus,targetName) local targetPlayer = source if isElement(targetPlayer) then outputChatBox("You are trying to mute/unmute this person: " .. targetName) end end) --[[ do your button stuff... triggerServerEvent("mutePlayer",targetPlayer,not muteStatus) ]]
-
you merge the code inside the resource of the models?
-
addEventHandler("onClientRender",root, function () end) Put only the dynamic code inside.
-
no, loadstring can still return a nil variable. but: "or false" will change a nil to a false/boolean. boolean = nil or false outputChatBox(type(boolean)) function toboolean(bool) if (bool) then return loadstring("return " ..bool)() or false end return false end
-
you can do this: local boolean = boolean == "true" and true or false Or you can make it a boolean(as you actually wanted to do it): local boolean = loadstring("return " .. boolean)() But I prefer the first one, since it is faster with the same/better result. It is better to get a boolean back then a nil, what ever happens in version 1 always returns a boolean.
-
@arezu ]] function test () end [/code] --[[ [code=lua]
-
clientside addEventHandler ( "onClientPlayerDamage",localPlayer, function ( attacker, weapon, bodypart) if weapon == 23 then cancelEvent() end end)
-
I hope they will ban his account/accounts, I hate crooks. Just report his post, will be enough when more people do that.
-
Easing functions like "Linear" and "OutElastic" do only affect the speed of moving. When you choose Linear, it will move with the same speed. When you choose InQuad, it will move fast in the beginning and slow down at the end. When you choose OutQuad, it will move slow in the beginning and speed up later.
