-.Paradox.- Posted July 28, 2013 Posted July 28, 2013 Hello, can somebody help me i want use getPlayerNametagColor for those scripts function giveSomeoneMoney(player, cmd, target, amount) if target then if amount then local money = getPlayerMoney(player) local targetplayer = getPlayerFromParticalName(target) amount = tonumber(amount) if targetplayer then if money >= amount then givePlayerMoney(targetplayer, amount) takePlayerMoney(player, amount) outputChatBox("#FF0000"..getPlayerName(player).."#0096FF gaved #00FF00$"..amount.."#0096FF to #FF9600"..getPlayerName(targetplayer), getRootElement(), 0, 81, 255, true) else outputChatBox("You don't have enought money!", player, 255, 0, 0) end else outputChatBox("Error: Player not found", player, 255, 0, 0) end else outputChatBox("Error: /givemoney [player name] [amount]", player, 255, 0, 0) end else outputChatBox("Error: /givemoney [player name] [amount]", player, 255, 0, 0) end end addCommandHandler("givemoney", giveSomeoneMoney) 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 And this addEventHandler("onPlayerChat", root, function(msg, msgType) if msgType == 1 then cancelEvent() outputChatBox("* #FFFFFF"..getPlayerName(source).."#0064FF "..msg, root, 255, 0, 0, true) end end) Thanks for helping. If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
iMr.3a[Z]eF Posted July 28, 2013 Posted July 28, 2013 And why you want to use it for. To Visit Us Press Here: mtasa://5.9.206.180:22002
-.Paradox.- Posted July 28, 2013 Author Posted July 28, 2013 getPlayerNametagColor If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
iMr.3a[Z]eF Posted July 28, 2013 Posted July 28, 2013 I know what to you want this function do in that codes. To Visit Us Press Here: mtasa://5.9.206.180:22002
-.Paradox.- Posted July 28, 2013 Author Posted July 28, 2013 Bump... If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
iMr.3a[Z]eF Posted July 28, 2013 Posted July 28, 2013 I asked you a question. To Visit Us Press Here: mtasa://5.9.206.180:22002
Castillo Posted July 28, 2013 Posted July 28, 2013 addEventHandler ( "onPlayerChat", root, function ( msg, msgType ) if ( msgType == 1 ) then cancelEvent ( ) local r, g, b = getPlayerNametagColor ( source ) outputChatBox ( "* #FFFFFF".. getPlayerName ( source ) .."#0064FF ".. msg, root, r, g, b, true ) end end ) Is this what you need? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
-.Paradox.- Posted July 28, 2013 Author Posted July 28, 2013 Yes, and for this too function giveSomeoneMoney(player, cmd, target, amount) if target then if amount then local money = getPlayerMoney(player) local targetplayer = getPlayerFromParticalName(target) amount = tonumber(amount) if targetplayer then if money >= amount then givePlayerMoney(targetplayer, amount) takePlayerMoney(player, amount) outputChatBox("#FF0000"..getPlayerName(player).."#0096FF gaved #00FF00$"..amount.."#0096FF to #FF9600"..getPlayerName(targetplayer), getRootElement(), 0, 81, 255, true) else outputChatBox("You don't have enought money!", player, 255, 0, 0) end else outputChatBox("Error: Player not found", player, 255, 0, 0) end else outputChatBox("Error: /givemoney [player name] [amount]", player, 255, 0, 0) end else outputChatBox("Error: /givemoney [player name] [amount]", player, 255, 0, 0) end end addCommandHandler("givemoney", giveSomeoneMoney) 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 If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
Castillo Posted July 28, 2013 Posted July 28, 2013 Well, what stops you from doing what I did with the other one? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
-.Paradox.- Posted July 28, 2013 Author Posted July 28, 2013 Im connected just from phone, and i copied the code from the top of the topic. If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
Castillo Posted July 28, 2013 Posted July 28, 2013 I'm not going to do it all for you, is not what this section is about. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
-.Paradox.- Posted July 28, 2013 Author Posted July 28, 2013 I tried to make it yesterday but i crashed it, it write instead of player name nil and r,g,b If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
Castillo Posted July 28, 2013 Posted July 28, 2013 Post what you tried. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
-.Paradox.- Posted July 28, 2013 Author Posted July 28, 2013 I'm at phone ._. when i come back i will post. If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
-.Paradox.- Posted July 28, 2013 Author Posted July 28, 2013 Bump If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
Castillo Posted July 28, 2013 Posted July 28, 2013 Why are you bumping the topic if you can't even do what I said? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
-.Paradox.- Posted July 28, 2013 Author Posted July 28, 2013 can you make it i did what u said but the script keep crashing... If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
TAPL Posted July 28, 2013 Posted July 28, 2013 can you make it i did what u said but the script keep crashing... Post what you tried.
-.Paradox.- Posted July 28, 2013 Author Posted July 28, 2013 i tried local rgb part from wiki... local r, g, b = getPlayerNametagColor ( thePlayer ) If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
iMr.3a[Z]eF Posted July 29, 2013 Posted July 29, 2013 As you said, when you are connecting by Computer post what you tried. To Visit Us Press Here: mtasa://5.9.206.180:22002
-.Paradox.- Posted July 29, 2013 Author Posted July 29, 2013 I deleted the file because its useless, anyway can you make it? If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
iMr.3a[Z]eF Posted July 29, 2013 Posted July 29, 2013 Rules are rules, if you tried we will do this for you. To Visit Us Press Here: mtasa://5.9.206.180:22002
-.Paradox.- Posted July 29, 2013 Author Posted July 29, 2013 ...Then why csmit helped me on another one without posting the code? If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
Castillo Posted July 29, 2013 Posted July 29, 2013 I deleted the file because its useless, anyway can you make it? We don't accept requests here. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
iMr.3a[Z]eF Posted July 29, 2013 Posted July 29, 2013 ...Then why csmit helped me on another one without posting the code? Maybe because he didn't knew the rules. To Visit Us Press Here: mtasa://5.9.206.180:22002
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now