iRack
-
Posts
17 -
Joined
-
Last visited
Posts posted by iRack
-
-
,,You want to show the timestamp before every line on the chat? (or I do not understand...) "
exactly! Thanks for help! I will buy a script, because it is not working, I think it is a problem between 8 and 19 because it is not working all the script.Your was what I wanted. Thanks for help man! Have a nice day!
- 1
-
No, I have a resource which is blocking the players colors, all players have the color White at their nick. For every time of chat like this: https://imgur.com/a/4danWtz Look at that guy [PREMIUM], that in premium chat [/pc] like [/a-chat admin] has before the tag a timestamp with the color green because the chat is made with that color. Or admin chat in this photo https://imgur.com/a/4danWtz . (2)Admin K... has a timestamp between him because is a different chat and the timestamp with another color. I don't know how to explain. This is my chat with your code : https://imgur.com/a/qKgGlCF Thanks for help
-
If someone type in the chat (T), the timestamp(timestamp is the [minutes:seconds]Player:<text>] it will be white. If someone type on a different chat like faction chat and that chat is blue, the timestamp will appear will the color blue. Another exemple, if i make a code with OutPutChatBox with #FF0000 (red), the timestamp will apear with the color red. Simple: the Color in chat will be exactly the timestamp color.
-
Hi! I have this code and I don't know how to make it to look like this : https://imgur.com/a/LZku5bk . My resource : https://imgur.com/a/RDaXnTk . I want that : when the private chat ( photo with red <<Inspector>> ) is with red, the time stamp will be with red or when I put an ad with color green , the time stamp will be green too. Code:
Quotefunction theFormat()
local realtime = getRealTime()
return
string.format("%02d:%02d:%02d", realtime.hour, realtime.minute, realtime.second)
endfunction chattime(text, msgtype)
local cTime = theFormat()
local pName = getPlayerName(source)
if (msgtype == 0) then
cancelEvent()
outputChatBox("["..cTime.."] #FFFFFF"..pName..": #ebddb2"..text, getRootElement(), 255, 255, 255, true)
end
end
addEventHandler("onPlayerChat", root, chattime)
-
Hi! Can someone help me? It didn't worked for me
addEvent("Arrow", true) addEventHandler("Arrow", root, function() local l_11_0 = getElementData(source, "carro") if not isElement(l_11_0) then outputChatBox(" *You do not have a vehicle!", source, 255, 0, 0) return end if l_11_0 and isElement(l_11_0) then if isElement(l_0_5[source]) then destroyElement(l_0_5[source]) outputChatBox(" *The arrow has been removed from your vehicle.", source, 255, 0, 0) else local l_11_1, l_11_2, l_11_3 = getElementPosition(l_11_0) l_0_5[source] = createObject(1318, l_11_1, l_11_2, l_11_3 + 2, 0, 0, 0) attachElements(l_0_5[source], l_11_0, 0, 0, 2) outputChatBox(" *The arrow has been attached to your vehicle.", source, 0, 255, 0) end end end )
and carro is :
veiculo = {} function carro() if getPedOccupiedVehicle(source) then displayServerMessage(source, "Get Out Of The Vehicle First", "warning") return end if veiculo[source] and isElement(veiculo[source]) then destroyElement(veiculo[source]) end local x, y, z = getElementPosition(source) veiculo[source] = createVehicle(541, x, y, z) warpPedIntoVehicle(source, veiculo[source]) displayServerMessage(source, "You Got a BMW M4 VIP", "confirm") end addEvent("carro", true) addEventHandler("carro", getRootElement(), carro)
Please help me. When I try to make the arrow it sais: ''You do not have a vehicle''! Help me please!!
-
Hi ! Can someone help me with a quest system ? I don't know how to make it like this : When you type [/quests] in chat will appear 2 quests ( it will be reseted at every 24h ) with color yellow. A simple quest : Go and photo the Police Departament or Go to the highest building in Los Santos . When you finish one of them, you will get some money. Please ! I don't know how to do it !
-
Hi guys ! I have this moddownloader ( https://community.multitheftauto.com/index.php?p=resources&s=details&id=11265 ) and I installed 2 cars, cadrona and elegy, after that I started followed the steps to get the car. When I added it in the folder named 'resources' and activating it, I recognized that the cars are not working. I opeded the folder and I saw the files has 0 MB. Can someone tell my what's wrong. I downloaded another moddownloader and again the same problem . All files was changed at 0 MB. Please help
-
Solved. Thanks a lot !
-
Hi ! Can someone tell my what type of resource is this ? This shows you exactly what happens in your console. I want the resource name or a link to download it. Thanks for help ! Have a nice day!
-
Hi can someone help me? I want to make a plot with Mapping for a farming. I can make the mapping, but i don't know how to make a plot like this: You, as a player, you can buy a small plot. You can own only that small plot where you can plant seeds. And the question is, how can i make the plot? To buy it with a small icon " i " and if you type [/buy] in chat and to take from the player an ammount of money with and OutPutChatMessage ,,You bought it". I want the rules to create it. Thanks a lot!
-
Hi, can someone help me ? I don't understand what's wrong. Look at this errors :
[2019-03-17 07:49:57] Starting rpdemine
[2019-03-17 07:49:57] WARNING: rpdemine\admin\server.lua:410: Bad argument @ 'getPlayerAccount' [Expected element at argument 1, got nil]
[2019-03-17 07:49:57] WARNING: rpdemine\admin\server.lua:410: Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean]
[2019-03-17 07:49:57] ERROR: rpdemine\admin\server.lua:411: attempt to concatenate local 'accName' (a boolean value)
[2019-03-17 07:49:57] WARNING: rpdemine\fraktion\ambulance\base.lua:107: Bad argument @ 'getPlayerAccount' [Expected element at argument 1, got nil]
[2019-03-17 07:49:57] WARNING: rpdemine\fraktion\ambulance\base.lua:115: Bad argument @ 'getPlayerFromName' [Expected string at argument 1, got nil]This is the script :
Quotefunction teleprotect ( thePlayer)
local vehicle = getPedOccupiedVehicle(playerSource)
if vehicle then
setElementVelocity(vehicle,0,0,0)
setElementPosition (vehicle, 4131.3872070313, -1759.1988525391, 3)
else
setElementPosition (playerSource, 4131.3872070313, -1759.1988525391, 3)
end
outputChatBox ("You Have Been Teleported To The Highway!!", playerSource, 0, 255, 0)
end
local accName = getAccountName(getPlayerAccount(thePlayer))
if isObjectInACLGroup("user."..accName, aclGetGroup("Admin")) then
outputChatBox ( "Server: You are not an owner!", thePlayer, 0, 255, 0 )
setElementPosition (thePlayer, 4131.3872070313, -1759.1988525391, 3)
else
outputChatBox (getPlayerName(thePlayer) .. ' #BEBEBEASf ! ', source, 255,255,255,true)
end
addCommandHandler ("highway", teleprotect)(Here I want to go to the highway with my car )
And this :
Quotefunction healPlayer(player, cmd, name, price)
if not name or not price then
outputChatBox("/heal [Player_Name] [Price]", player, 255, 255, 255, true)
else
end
end
local gang = getPlayerAccount(thePlayer)
if (gang) then
if getAccountData(gang, "keks.fraktion") == 3 then
outputChatBox("hp <name> <price>", thePlayer)
else
outputChatBox("You are not a member of Paramedic!", thePlayer, 255, 0, 0)
end
end
local target = getPlayerFromName(name)
if target then
if getPlayerMoney(target)>=tonumber(price) then
takePlayerMoney(target, tonumber(price))
givePlayerMoney(player, tonumber(price))
setElementHealth(target, 100)
outputChatBox(getPlayerName(player) .. " healed you!", player, 255, 255, 255, true)
outputChatBox("You healed " .. getPlayerName(target), player, 255, 255, 255, true)
else
outputChatBox("Can't pay the healing", player, 255, 255, 255, true)
end
else
outputChatBox("I can't find the target!", player, 255, 255, 255, true)
end
addCommandHandler("heal", healPlayer)(This is a faction system, if you are in the faction named ''Paramedic Departament'' with ID 3, you will be able to use the command [/heal]. What's wrong with this scripts ? thanks a lot guys !!!
-
Thanks ! It worked ! Have a nice day sir !
-
Hi ! Can someone help me ? I want: ONLY in that cylinder you can use command [/ad], only in it, I don't know how to do it. ( it's an advertisement system for RPG ) Thanks a lot !
function Advertisment(thePlayer, commandName, ...) local players = getElementsByType("player") local playerName = getPlayerName ( thePlayer ) local chatContent = {...} for index, player in ipairs ( players ) do outputChatBox( "Advertisment from " .. playerName.. ": " ..table.concat ( chatContent, " "), player, 0, 190, 40) end end addCommandHandler( "ad", Advertisment ) cylinder = createMarker(1168.6981201172, -1489.6285400391, 21.756763458252, "cylinder", 5, 100, 0, 0) setElementInterior(cylinder, 0) function Advertisment (thePlayer) if source == Advertisment then setElementInterior(thePlayer, 0) setElementPosition(thePlayer, 1168.6981201172, -1489.6285400391, 22.756763458252) elseif source == cylinder then outputChatBox("Type [/ad] to publish your advertisment.", thePlayer, 255, 255, 0) end end addEventHandler("onMarkerHit", getRootElement(), Advertisment)
-
-
Thanks a lot guys ! Thanks ! :)
- 1
-
Hi ! Can someone help me with a command. When I type [/heal <Name> <Price>] to give that player heal 100% and to take from the player some money. Please ! Thanks a lot !
Acl problem
in Scripting
Posted
Hi! Can someone help me to solve this problem? Problem : [2019-06-19 17:29:06] ERROR: boxcreated\server.Lua:52: bad argument #2 to 'random' (interval is empty)
[2019-06-19 17:29:06] ERROR: boxcreated\server.Lua:57: bad argument #1 to 'random' (number expected, got table)
52 is: local money = math.random(settings.cashCount[1],settings.cashCount[2])
57 is: local premium = math.random(settings.premiumCount)
and:
Help please ?