//_Dragon Posted January 2, 2016 Share Posted January 2, 2016 (edited) Removed Edited January 3, 2016 by Guest Link to comment
Enargy, Posted January 2, 2016 Share Posted January 2, 2016 did you mean getPlayerNametagColor? Link to comment
-Doc- Posted January 2, 2016 Share Posted January 2, 2016 getPlayerNametagColor https://wiki.multitheftauto.com/wiki/Scripting_Introduction https://wiki.multitheftauto.com/wiki/GetPlayerNametagColor Link to comment
-Doc- Posted January 2, 2016 Share Posted January 2, 2016 And please dont try to copy again my tags in global chat.He wants this Link to comment
//_Dragon Posted January 2, 2016 Author Share Posted January 2, 2016 i dont want make it i just wanna help my friend to fixe it ^^ Link to comment
Dealman Posted January 2, 2016 Share 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". Link to comment
//_Dragon Posted January 2, 2016 Author Share Posted January 2, 2016 (edited) Removed Too Edited January 3, 2016 by Guest Link to comment
Dealman Posted January 2, 2016 Share 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 Link to comment
//_Dragon Posted January 2, 2016 Author Share Posted January 2, 2016 yes i get some bug but i dont know how i can fix the problem I do all possibility Link to comment
Dealman Posted January 3, 2016 Share 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. Link to comment
Enargy, Posted January 3, 2016 Share Posted January 3, 2016 local name = getPlayerName(player) local r, g, b = getPlayerNametagColor(player) Link to comment
//_Dragon Posted January 3, 2016 Author Share Posted January 3, 2016 (edited) Removed Edited January 4, 2016 by Guest Link to comment
Addlibs Posted January 3, 2016 Share Posted January 3, 2016 source is not defined. You're probably not using an event to call the function 'Local' Link to comment
//_Dragon Posted January 4, 2016 Author Share Posted January 4, 2016 Dude script is working only problem is in getplayerName & getNamePlayercolor check this pic for see debugscript : http://imgur.com/hj9mt9O Link to comment
Addlibs Posted January 4, 2016 Share 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) Link to comment
#RooTs Posted January 4, 2016 Share 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 Link to comment
//_Dragon Posted January 4, 2016 Author Share 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) ? Link to comment
//_Dragon Posted January 4, 2016 Author Share Posted January 4, 2016 Anyway i fixe it Link to comment
-Doc- Posted January 6, 2016 Share Posted January 6, 2016 It's writing *fix* not ''fixe'' Link to comment
//_Dragon Posted January 6, 2016 Author Share 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) Link to comment
#RooTs Posted January 6, 2016 Share Posted January 6, 2016 try this outputChatBox(getPlayerName(player).." give "..amount.." to "..getPlayerName(targetplayer), getRootElement(), 0, 165, 0, true) Link to comment
//_Dragon Posted January 6, 2016 Author Share 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) Link to comment
Addlibs Posted January 6, 2016 Share 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). Link to comment
-Doc- Posted January 7, 2016 Share Posted January 7, 2016 He can't make a simple outputChatBox but at more complicated scripts..Better unistall mta and leave this game Link to comment
Tails Posted January 7, 2016 Share 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. Link to comment
Recommended Posts