//_Dragon Posted January 2, 2016 Posted January 2, 2016 (edited) Removed Edited January 3, 2016 by Guest
-Doc- Posted January 2, 2016 Posted January 2, 2016 getPlayerNametagColor https://wiki.multitheftauto.com/wiki/Scripting_Introduction https://wiki.multitheftauto.com/wiki/GetPlayerNametagColor
-Doc- Posted January 2, 2016 Posted January 2, 2016 And please dont try to copy again my tags in global chat.He wants this
//_Dragon Posted January 2, 2016 Author Posted January 2, 2016 i dont want make it i just wanna help my friend to fixe it ^^
Dealman Posted January 2, 2016 Posted January 2, 2016 And please dont try to copy again my tags in global chat.He wants this Yours is not the only server to have such tags. You copied someone else's just as much as he's "copied yours".
//_Dragon Posted January 2, 2016 Author Posted January 2, 2016 (edited) Removed Too Edited January 3, 2016 by Guest
Dealman Posted January 2, 2016 Posted January 2, 2016 Do you get any debug messages when using only getPlayerName? As far as I'm aware, getPlayerName should return the full name, including any hex colour. For example; getPlayerName(thePlayer) -- #454545Dealman And since you've set colour-coded to true, it should work without having to use getPlayerNametagColor. Edit: Stop PM'ing me when you already have a thread made. Other people might benefit from the assistance given here, not from my PM inbox
//_Dragon Posted January 2, 2016 Author Posted January 2, 2016 yes i get some bug but i dont know how i can fix the problem I do all possibility
Dealman Posted January 3, 2016 Posted January 3, 2016 Does it output any message at all? If it doesn't output any message, it's possible the message is too long.
Enargy, Posted January 3, 2016 Posted January 3, 2016 local name = getPlayerName(player) local r, g, b = getPlayerNametagColor(player)
//_Dragon Posted January 3, 2016 Author Posted January 3, 2016 (edited) Removed Edited January 4, 2016 by Guest
Addlibs Posted January 3, 2016 Posted January 3, 2016 source is not defined. You're probably not using an event to call the function 'Local'
//_Dragon Posted January 4, 2016 Author Posted January 4, 2016 Dude script is working only problem is in getplayerName & getNamePlayercolor check this pic for see debugscript : http://imgur.com/hj9mt9O
Addlibs Posted January 4, 2016 Posted January 4, 2016 Dude, the only time you try to use 'source' is in getPlayerName and getPlayerNametagColor. Is that a coincidence that the WARNING message occurs only on those lines? (The ERROR message occurs because getPlayerNametagColor fails)
#RooTs Posted January 4, 2016 Posted January 4, 2016 Hello guys, there is already a discussion about it. please. closed, one of the topics https://forum.multitheftauto.com/viewtopic.php?f=91&t=95000
//_Dragon Posted January 4, 2016 Author Posted January 4, 2016 Dude, the only time you try to use 'source' is in getPlayerName and getPlayerNametagColor. Is that a coincidence that the WARNING message occurs only on those lines? (The ERROR message occurs because getPlayerNametagColor fails) What i can do ? i can change (source)maybe (name) ?
//_Dragon Posted January 6, 2016 Author Posted January 6, 2016 I want add here hex too but doesnt work ? function giveSomeoneMoney(player, cmd, target, amount) if target then if amount then local money = getPlayerMoney(player) local targetplayer = getPlayerFromName(target) local r, g, b = getPlayerNametagColor(player) local hex = string.format("#%.2X%.2X%.2X", r, g, b) amount = tonumber(amount) if targetplayer then if money >= amount and amount >= 250 then givePlayerMoney(targetplayer, amount) takePlayerMoney(player, amount) outputChatBox("..getPlayerName(player).." give "..amount.." to "..getPlayerName(targetplayer), getRootElement(), 0, 165, 0, true)
#RooTs Posted January 6, 2016 Posted January 6, 2016 try this outputChatBox(getPlayerName(player).." give "..amount.." to "..getPlayerName(targetplayer), getRootElement(), 0, 165, 0, true)
//_Dragon Posted January 6, 2016 Author Posted January 6, 2016 try this outputChatBox(getPlayerName(player).." give "..amount.." to "..getPlayerName(targetplayer), getRootElement(), 0, 165, 0, true) i've it dude but after adding hex wont work function giveSomeoneMoney(player, cmd, target, amount) if target then if amount then local money = getPlayerMoney(player) local targetplayer = getPlayerFromName(target) local r, g, b = getPlayerNametagColor(player) local hex = string.format("#%.2X%.2X%.2X", r, g, b) amount = tonumber(amount) if targetplayer then if money >= amount and amount >= 250 then givePlayerMoney(targetplayer, amount) takePlayerMoney(player, amount) outputChatBox("..getPlayerName(player).." give "..amount.." to "..getPlayerName(targetplayer), getRootElement(), 0, 165, 0, true)
Addlibs Posted January 6, 2016 Posted January 6, 2016 Where did you add hex? Am I blind or what? I don't see it. However, I do see that you can't even script in Lua if you don't see string formatting/syntax mistakes in your code when they're syntax-highlighted (on this forum).
-Doc- Posted January 7, 2016 Posted January 7, 2016 He can't make a simple outputChatBox but at more complicated scripts..Better unistall mta and leave this game
Tails Posted January 7, 2016 Posted January 7, 2016 Droam|Oussez, Don't come here asking questions and then remove all of your posts... don't post your friggin code in the first place if don't want anyone to use it or learn from it.
Recommended Posts