-
Posts
378 -
Joined
-
Last visited
Everything posted by BriGhtx3
-
Anyway you should know you can't cancel damage/kill events serverside
-
As far as I know this was the error (The space between "sv" and "infernus"). like TAPL said it has to be like this : executeCommandHandler("sv", source, "infernus")
-
No, onPlayerChat has just 2 parameters
-
this problem is already solved, the scoreboard thing is the problem oO
-
I already did it, but it never worked. Edited line 705 added if column.name.... But it still doesn't show it, neither put out the country.
-
New problem : I'm trying to show the players country but it always returns false. function setLand() local flag = exports['admin']:getPlayerCountry ( source ) outputChatBox(tostring(flag)) if flag then setElementData(source,"Land",":admin/client/images/flags/"..flag..".png") else setElementData(source,"Land","N/A") end end addEventHandler("onPlayerJoin",getRootElement(), setLand) The country is always set to N/A. I'm living in Germany
-
Hmm alright, would be nice if there was a single Handler but ok Thanks
-
Is it possible to create something that when the amount of money changes, it automaticly saves it? I know that I can use a timer, but I mean sth like a handler
-
Thank You I tried to integrate a function in a function which actually works But anyway thanks
-
function createTheOverallText(text) local x,y = guiGetScreenSize() addEventHandler("onClientRender",getRootElement(), function() msgBack = dxDrawRectangle(0,y/20,x,y/20,tocolor(0,0,0,80)) local txtw = dxGetTextWidth(text, 0.78, "bankgothic") msgText = dxDrawText ( text, x/2 - txtw / 2, y/23, x, y, tocolor ( 0,0,0, 255 ), 0.78, "bankgothic" ) end ) setTimer( function() removeEventHandler("onClientRender",getRootElement(), function() msgBack = dxDrawRectangle(0,y/20,x,y/20,tocolor(0,0,0,80)) local txtw = dxGetTextWidth(text, 0.78, "bankgothic") msgText = dxDrawText ( text, x/2 - txtw / 2, y/23, x, y, tocolor ( 0,0,0, 255 ), 0.78, "bankgothic" ) end ) end, 5000,1 ) end addEvent("overalltext",true) addEventHandler("overalltext",getRootElement(),createTheOverallText) It doesn't remove the text after 5 seconds -.- I call the function like this : triggerClientEvent("overalltext",getRootElement(), stringWithAllParameters)
-
It already works with my Faction System
-
Oh okay Thank you
-
So here I've got a function : function teamsay_all(player,cmd, ...) local FRank = tonumber(destinyGetData (player,"rang")) local parametersTable = {...} local text = table.concat( parametersTable, " " ) local ranktitle = "" if destinyGetData(player,"fraktion") == 1 then if FRank == 0 then ranktitle = "Constable" end if FRank == 1 then ranktitle = "Captian" end if FRank == 2 then ranktitle = "Marshall" end if FRank == 3 then ranktitle = "Commander" end if FRank == 4 then ranktitle = "Bureau Chief" end if FRank == 5 then ranktitle = "Chief of Department" end red = 0 green = 0 blue = 205 else triggerClientEvent ( player, "infobox", getRootElement(), "Du bist in keiner Fraktion!", 5000, 155, 0, 0 ) end for playeritem, index in pairs(fraktionsMemb[destinyGetData(player,"fraktion")]) do outputChatBox ( "[[ "..ranktitle.." | "..getPlayerName(player)..": "..text.." ]]", playeritem, red, green, blue ) end end addCommandHandler("t",teamsay_all) Now I want to use that function for the y-chat. So I used this code : function cheata (text,msType) if msType == 2 then executeCommandHandler("t",source,text) end end addEventHandler( "onPlayerChat", getRootElement(), cheata ) But it doesn't work When I use /t it works.
-
Ehm then how can I use the y-chat for a faction chat? So that I bind the y-key to my chat function.
-
I tested it. It already outputs the messageType without the tostring when the type is 0, but it doesn't output it WHEN THE TYPE IS TEAMMESSAGE
-
You didn't read the question -.- I want to detect if the player uses the teamchat and output his message and not change the type to string. The problem is that he doesn't detect whether it is the teamchat or not.
-
I'm trying to put out the message of the teamchat, but I can't switch to messageType 2. function cheata (text,msType) if msType == 2 then outputChatBox(msType) outputChatBox(text) end end addEventHandler( "onPlayerChat", getRootElement(), cheata ) So when I press "y" and type in the message then the message isn't outputed. When I change the msType to 0 it puts the message out. The question is, how do I detect the message of the teamchat?
-
I already fixed it. I tried yous, doesn't work. My solution : function harndrang(Player) local harndrangZahl = getElementData(Player, "harndrang") setTimer(auffuellen, 1000, 10, Player) end function auffuellen(Player) local harndrangZahler = getElementData(Player, "harndrang") setElementData(Player,"harndrang", tonumber(harndrangZahler)+1) end
-
function harndrang(Player) local harndrangZahl = getElementData(Player, "harndrang") setTimer(auffuellen, 1000, 10, Player, harndrangZahl) end function auffuellen(Player, harndrangZahler) setElementData(Player,"harndrang", tonumber(harndrangZahler+1)) end The script should set harndrang, every second +1 until it gets 10. But it sets harndrang just, +1 and then stops.
-
local path = playSound3D( path, x, y, z, true) ?
-
function PoliceTeam(button,state) if button == "left" and state == "up" then setPlayerTeam ("Police") triggerServerEvent("PoliceTeam") -- hide the gui, hide the cursor and return control to the player guiSetInputEnabled(false) guiSetVisible(wdwLogin, false) showCursor(false) end end --end You dont need the last end
-
in the code of solidsnake you see that the type is checked.
-
It should, but it doesn't
