-
Posts
64 -
Joined
-
Last visited
-
Days Won
1
Everything posted by ÆBKV
-
https://community.multitheftauto.com/index.php?p=resources&s=details&id=6828
-
givePlayerMoney(player,cash)
-
local spawns = { { 1936.1899414063, 1622.6533203125, 72.2578125, 90 }, --1 { 2155.63671875, 1483.9974365234, 24.140625, 90}, --2 { 2023.1564941406, 1436.7003173828, 10.8203125, 90 }, --3 { 2121.4245605469, 1484.5670166016, 10.8203125, 90 }, --4 { 2170.0751953125, 1679.1960449219, 10.8203125, 90 }, --5 { 2095.324218755, 1282.2322998047, 10.8203125, 90 }, --6 } function spawn( player ) local rnd = math.random( 1, #spawns ) if not getElementData( player, "pvp" ) then setElementData( player, "pvp", true ) setElementPosition( player, spawns[rnd][1], spawns[rnd][2], spawns[rnd][3] ) else return end end addCommandHandler("pvp",spawn) i
-
Use "00:00:00" instead of "0:0:0" It looks much better
- 10 replies
-
- play time
- server side
-
(and 1 more)
Tagged with:
-
Yes it's wrong, you can't start with "elseif" and use "else". Use "if" instead of "elseif". And I think the flags are only visible if your server is hosted. I'm not sure but that can probably be the problem.
-
I think it's already decrypted
-
The event "onClientPlayerDamage" was canceled somewhere
-
dxDrawImage(topX+theX,y+s(1),16,11,content,0,0,0,cWhite,drawOverGUI) The problem here is that probably nobody knows in which line this belongs.
-
wait and no that's not the problem
-
else setElementData(source,"Home","N/A")
-
if skin == 0 or skin == 257 then
-
function replace() if guiCheckBoxGetSelected(...) then txd = engineLoadTXD("...") engineImportTXD(txd,...) dff = engineLoadDFF("...") engineReplaceModel(dff,...) else engineRestoreModel(...) end end addEventHandler("onClientGUIClick",root,replace)
-
function resRes() local resource = getThisResource() if getResourceState(resource) == "running" then restartResource(resource) end end setTimer(resRes,86400000,0) Add this to the script on server-side. It‘s better because you don‘t have to edit it if you rename the resource.
-
function resRes() local resource = getResourceFromName("DrugDealer") if getResourceState(resource) == "running" then restartResource(resource) end end setTimer(resRes,86400000,0)
-
function getObjectID() local objects = getElementsByType("object") for i,object in ipairs(objects) do if getElementModel(object) then return object end end return false end try this
-
addEventHandler("onClientGUIClick",ENTER1, function() setElementPosition(localPlayer,1549.88953,-1685,13) end ) If you use source on "onClientGUIClick" it does get the gui element not the player so use always localPlayer on client-side scripts to get the player.
-
Don't forget "then". if hours == 12 and minutes == 30 then elseif hours == 4 and minutes == 10 then
-
if hours == 12 and minutes == 30 elseif hours == 4 and minutes == 10 do this all like this
-
function giveMoney(sender,command,name,amount) if not name or not amount then outputChatBox("Usage: #FFFFFF/givemoney [player name] [amount]",sender,255,0,0,true) return end local receiver = getPlayerFromName(name) if not receiver then outputChatBox("Couldn't find a player with the name #FFFFFF("..name..").",sender,255,0,0,true) return end local receiver = getPlayerFromName(name) if receiver == sender then outputChatBox("You can't give money to yourself.",sender,255,0,0) return end if not tonumber(amount) then outputChatBox("Please enter a valid value.",sender,255,0,0) return end local receiver = getPlayerFromName(name) local receivername = getPlayerName(receiver) local sendername = getPlayerName(sender) local sendermoney = getPlayerMoney(sender) if receiver and tonumber(amount) <= sendermoney then takePlayerMoney(sender,amount) givePlayerMoney(receiver,amount) outputChatBox("You gave #FFFFFF"..receivername.." #00FF00$"..tonumber(amount)..".",sender,0,255,0,true) outputChatBox(""..sendername.." #00FF00gave you $"..tonumber(amount)..".",receiver,255,255,255,true) else outputChatBox("You don't have $"..tonumber(amount)..".",sender,255,0,0,true) end end addCommandHandler("givemoney",giveMoney) For example, when I type in /givemoney 4BKV -500 it works too. How can I fix this?
-
Dieses Fahrzeug gehört
-
addEventHandler("onClientPlayerVehicleEnter",root, function() local vehicle = getPedOccupiedVehicle(source) local x,y,z = getElementPosition(vehicle) sound = playSound3D("sound1.mp3",x,y,z,true) attachElements(sound,vehicle) end ) try this
-
Is it the same if I use root instead of players. Do you know that maybe? like this setElementVisibleTo(player,root,false)