-
Posts
1,239 -
Joined
-
Last visited
Everything posted by -.Paradox.-
-
Try changing player argument
-
Line 12 is working fine for target player Without converting it, The problem is that it doesnt show for the player who sent the money....
-
Sorry for being unclear, I'm trying to set racer ElementData (Away From Keyboard) to false after moving his curosr or clicking a key, thanks.
-
Editing prices and vehicles count doesnt make any change.
-
You should ban this guy, This script is castillo's he done some edits on it, changing bind prices etc, Copied: https://community.multitheftauto.com/index.php?p= ... &pic=14493 Original: https://community.multitheftauto.com/index.php?p= ... ils&id=720 DONE
-
Anyone? Or just give me functions/events i could use to check when the player move cursor and press a key.
-
I did it already with getPlayerIdleTime in Server side and i set his element Data to "Away From Keyboard", in the client side i wanted to use onClientKey and onClientCursorMove to check if his ElementData is Away From Keyboard then set it to false...
-
Hello guys, I'm trying to make an Away From Keyboard script for my multi-gamemode race server, In a running gamemode if player didn't move for exactly 1 minute he get kicked and i'm trying to cancel it if he moved before 1 min passes, anyway here is the code. function checkSomething() if getElementData(thePlayer, "Away From Keyboard") == true then setElementData(thePlayer, "Away From Keyboard", false) end end addEventHandler("onClientKey", getRootElement(), checkSomething) addEventHandler( "onClientCursorMove", getRootElement(), checkSomething)
-
function privateMessage(thePlayer,commandName,sendToName,...) local pmWords = { ... } local pmMessage = table.concat( pmWords, " " ) if sendToName then if (getPlayerFromParticalName (sendToName)) then local toPlayer = (getPlayerFromParticalName (sendToName)) local toPlayerTeam = getPlayerTeam(toPlayer) if toPlayerTeam then local toRed, toGreen, toBlue = getTeamColor(toPlayerTeam) toColor = string.format("#%02X%02X%02X", toRed, toGreen, toBlue) else toColor = '#ffffff' end local fromPlayerTeam = getPlayerTeam(thePlayer) if fromPlayerTeam then local fromRed, fromGreen, fromBlue = getTeamColor(fromPlayerTeam) fromColor = string.format("#%02X%02X%02X", fromRed, fromGreen, fromBlue) else fromColor = '#ffffff' end if not (toPlayer == thePlayer) then if not (pmMessage == "") then outputChatBox("#FF4646(WHISPER) To ".. toColor .. getPlayerName(toPlayer) .. ":#FFFFFF " .. pmMessage, thePlayer, 255, 255, 255, true) outputChatBox("#FF4646(WHISPER) From " .. fromColor .. getPlayerName(thePlayer) .. ":#FFFFFF " .. pmMessage, toPlayer, 255, 255, 255, true) outputServerLog("(WHISPER) From "..getPlayerName(thePlayer).." To ".. getPlayerName(toPlayer)..": " .. pmMessage) else outputChatBox("#FF4646(WHISPER)#FFFFFF Invalid syntax! Usage:#FFFFFF /pm [player name] [message]", thePlayer, 255, 255, 255, true) return false end else outputChatBox("#0044FF(WHISPER)#FFFFFF You cannot Whisper yourself#FFFFFF!", thePlayer, 255, 255, 255, true) return false end else outputChatBox("#0044FF(WHISPER)#FFFFFF Player not found! #FFFF00(#FFFFFF"..sendToName.."#FFFF00)", thePlayer, 255, 255, 255, true) return false end else outputChatBox("#0044FF[PM]#FFFFFF Invalid syntax! Usage:#FFFFFF /pm [partical player name] [message]", thePlayer, 255, 255, 255, true) return false end end addCommandHandler("pm", privateMessage) addCommandHandler("w", privateMessage) function getPlayerFromParticalName(thePlayerName) local thePlayer = getPlayerFromName(thePlayerName) if thePlayer then return thePlayer end for _,thePlayer in ipairs(getElementsByType("player")) do if string.find(string.gsub(getPlayerName(thePlayer):lower(),"#%x%x%x%x%x%x", ""), thePlayerName:lower(), 1, true) then return thePlayer end end return false end
-
onPlayerJoin* Why you can't just use serials in stead account data?
-
If it didn't worked, don't expect from me to help you again.. Removed
-
Didn't notice it, I was on phone..
-
local function onplayerChat ( message, messageType ) if ( messageType == 2 ) then cancelEvent ( ) local name = getPlayerName ( source ) local red, green, blue = getPlayerNametagColor ( source ) local hex = RGBToHex ( red, green, blue ) local members = getPlayersInTeam( team ) or {} for _, player in ipairs(members) do outputChatBox( "#FFFFFF(CLAN)" .. hex.." "..name .. ":#FFFFFF" .. message, player, 255, 255, 255, true ) end outputServerLog( "(TEAM): " .. name .. ": " .. message ) end end addEventHandler ( "onPlayerChat", root, onplayerChat ) For you Nikolai itsnot Working at all its not showing any thing , i mean itsnot showing (CLAN) OR (TEAM) it makes space in outputChatBox Heeeeeeeeeeeelp Then what the hell is this code? huh
-
Hmm..No. Use my first code and add to it the RGBToHex code.
-
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. Also me. As far as i know him he will post back that it's not working or something. Told you ;D Then use what i posted before.
-
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. Also me. As far as i know him he will post back that it's not working or something.
-
Add this to my old code. function RGBToHex(red, green, blue) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255)) then return nil end return string.format("#%.2X%.2X%.2X", red, green, blue) end
-
Where is the loop for team members?
-
Stop blaming him, It's nof his fault, It's yours because you don't know how to fix it or ateast just tell what does debug say. Read my post again.
-
I told you. And spider since you don't know how to use it then no need to help you... onPlayerChat is serverside. Add this to your code. function RGBToHex(red, green, blue) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255)) then return nil end return string.format("#%.2X%.2X%.2X", red, green, blue) end
-
Do a loop to check players who have the same team then send the message.