-
Posts
1,390 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Et-win
-
You are getting the data from thePlayer, but setting it to source. Are you sure this not has to be thePlayer too?
-
If the player is muted, then cancel the event. Just like 'you' did by 'your' teamchat script.
-
outputChatBox( "#FFFFFF(CLAN)" .. hex.." "..name .. ":#FFFFFF" .. message, player, 255, 255, 255, true ) His, not mine.
-
If you simply let his outputChatBox in, then it did work.
-
Yes, like that. Now put it in your function where you want to have the color.
-
function sPlayerLevel() local account = getPlayerAccount(source) local playerLevel = 0 if not (isGuestAccount(account)) then local level = exports.exp_system:getAccountLevel(account) if (level ~= nil) and (level ~= false) then playerLevel = level end end setElementData(source, "Level", playerLevel) end addEvent("onPlayerChangeLevel", true) addEventHandler("onPlayerChangeLevel", getRootElement(), sPlayerLevel) addEventHandler("onPlayerLogin", getRootElement(), sPlayerLevel) This should work without a timer. Otherwise, add: setTimer(function() sPlayerLevel() end, seconds-in-milliseconds, 0) (Didn't test it, could be I typos something. (A))
-
Now you can compare Nikolai96's code from RGBToHex with this one. Good luck.
-
Good, but by your next script I'm not going to help you anymore. Unless you are not bothered with posting what debugscript 3 says and you look by yourself into the code's of yourself and ours. Try to actually learn from it.
-
addEventHandler('onPlayerChat', getRootElement(), function(msg, type) if type == 2 then cancelEvent() local r, g, b = getPlayerNametagColor(source) for placeNumber, playerData in ipairs(getPlayersInTeam(getPlayerTeam(source))) do outputChatBox("(CLAN)"..getPlayerName(source)..":#FFFFFF "..string.gsub(msg, "#%x%x%x%x%x%x", ""), playerData, r, g, b, true) end end end ) Here.
-
Lol, why it does work on my server then? It gives me an error, and totally no output in the chatbox. Is the script even started, lol?
-
You don't even know what you are doing or what? You say there are absolutly no debugescript 3 error? It actually gives the error that RGBToHex is a nil value, in other words: This code/function was not found. Also, it doesn't give any 'space' to the chatbox, because that error is given. You said you tried everything, but you don't even know what you are doing!
-
Should do the hours and minutes separated, because 'setTime' needs that. function cTime(theCommand, timeID1, timeID2) local timeID1 = tonumber(timeID1) --Hours local timeID2 = tonumber(timeID2) --Minutes local sTime = setTime(timeID1, timeID2) if (sTime ~= false) then --Success else --Failed end end addCommandHandler("cst", cTime) addCommandHandler("csettime", cTime) Note: This is client-side.
-
Take my client-side code. Add one more variable into the function. Add one more local variable to make the variable you just added to the function a number (tonumber()). Change the 'setWeather' code to the 'setTime' code and it's needed 'settings'.
-
You are now only editing the data, not the scoreboard.
-
setTimer getBlipColor setBlipColor Put it on a function which checks or the color is red or blue. If it is blue, then make it red, if it is red, make it blue. Also check or the blip actually exists and put the timer on 1500 seconds (=1,5 seconds) and put it on unlimited repeats (=0).
-
I don't know how to attach a timer to this kind of a function. Give it a name by then and then add a timer. (I should check it every 10 seconds or so, or atleast not every 1 second)
-
*Coughs* For server-side: function cWeather(thePlayer, theCommand, weatherID) local weatherID = tonumber(weatherID) local sWeather = setWeather(weatherID) if (sWeather ~= false) then outputChatBox("Successfully changed the weather!", thePlayer) else outputChatBox("This is not a valid weather ID. You entered: "..tostring(weatherID), thePlayer) end end addCommandHandler("cws", cWeather) For client-side: function cWeather(theCommand, weatherID) local weatherID = tonumber(weatherID) local sWeather = setWeather(weatherID) if (sWeather ~= false) then outputChatBox("Successfully changed the weather!") else outputChatBox("This is not a valid weather ID. You entered: "..tostring(weatherID)) end end addCommandHandler("cws", cWeather) Typed in my own 'rules' this time. I guess it shouldn't give any errors by 'setWeather' if I'm correct
-
This code is only doing it's job if you Login. You should put a timer or an Event on it so it keeps checking the player's level.
-
addEventHandler('onPlayerChat', g_Root, function(msg, type) if type == 2 then cancelEvent() local r, g, b = getPlayerNametagColor(source) for placeNumber, playerData in ipairs(getPlayersInTeam(getPlayerTeam(source))) do outputChatBox(getPlayerName(source) .. '(CLAN)' .. msg:gsub('#%x%x%x%x%x%x', ''), playerData, r, g, b, true) end end end ) Too bored to explain, sorry guys x3
-
For client-side: addCommandHandler('csw', function (Weather) Weather = tonumber(Weather) local sWeather = setWeather(Weather) if (sWeather == false) then outputChatBox("This is not a valid weather ID! You entered: "..Weather) end end end) For server-side: addCommandHandler('csw', function (Weather) Weather = tonumber(Weather) local sWeather = setWeather(Weather) if (sWeather == false) then outputChatBox("This is not a valid weather ID! You entered: "..Weather, source) end end end)
-
getPlayerTeam getPlayersInTeam Make a loop, and send it to all players who are in the same team as you.
-
Maybe some useful information can be found here: viewtopic.php?f=91&t=52825 Try to use Google next time EDIT: Also, if you want to detect the tractor, you can detect the vehicle where the player is in currently: getPedOccupiedVehicle
-
Is this even your own script? Because you say blips don't appear means you 'know' that they have to, but I don't see any 'createBlip' code in your script.
-
Thanks and nice one!
