[STM]Metalhero Posted July 8, 2010 Posted July 8, 2010 (edited) addCommandHandler ("use", function(player,command,Fun,FunPlayerName) if (findPlayerByName (FunPlayerName)) then local playerToFun = findPlayerByName (FunPlayerName) local Text = (Fun) outputChatBox (getPlayerName(player) .. " #FF0000is use ".. Text .." with " .. getPlayerName(playerToFun),getRootElement(),51,255,0,true) end end) whats Wrong Edited July 8, 2010 by Guest
[STM]Metalhero Posted July 8, 2010 Author Posted July 8, 2010 i have all you !!!!!!! but it son part of script
m4rsje Posted July 8, 2010 Posted July 8, 2010 addCommandHandler ("use", function(player,command,Fun,FunPlayerName) if (findPlayerByName (FunPlayerName)) then local playerToFun = findPlayerByName (FunPlayerName) local Text = (Fun) outputChatBox (getPlayerName(player) .. " #FF0000is use ".. Text .." with " .. getPlayerName(playerToFun),getRootElement(),51,255,0,true) end end) whats Wrong 50p means, what is wrong? what is it suppose to be, and what doesn't work about it.
m4rsje Posted July 8, 2010 Posted July 8, 2010 i see findPlayerByName doesn't excist what is it suppose to be?
DiSaMe Posted July 8, 2010 Posted July 8, 2010 There's no function findPlayerByName, unless you create one. If you need to get player with a specified nickname, use getPlayerFromName. And it's better to store function result in a variable if you need to use it a few times. I'll try to correct your code addCommandHandler("use", function(player,command,Fun,FunPlayerName) local playerToFun = getPlayerFromName(FunPlayerName) if playerToFun then outputChatBox (FunPlayerName.." #FF0000is use "..Fun.." with "..getPlayerName(player),getRootElement(),51,255,0,true) end end )
m4rsje Posted July 8, 2010 Posted July 8, 2010 i told you it doesn't look at the wiki if your not sure if an function excist https://wiki.multitheftauto.com/wiki/Main_Page
[STM]Metalhero Posted July 8, 2010 Author Posted July 8, 2010 function findPlayerByName (playerPart) for i,v in ipairs (getElementsByType ("player")) do if (string.find(getPlayerName(v),playerPart)) then return v end end end look you !!!!!!!!!!!!!
dzek (varez) Posted July 8, 2010 Posted July 8, 2010 STOP !!! ACTING !!! LIKE !!! A !!! DAMN !!! KID !!! OKAY ? answer for your PROBLEMS: (unrelated to main topic) https://forum.multitheftauto.com/viewtop ... 91&t=27027
m4rsje Posted July 8, 2010 Posted July 8, 2010 STOP !!! ACTING !!! LIKE !!! A !!! DAMN !!! KID !!!OKAY ? answer for your PROBLEMS: (unrelated to main topic) https://forum.multitheftauto.com/viewtop ... 91&t=27027 varez, chill down abit, i know its getting annoying people dont read the sticky's but there should make a kind of system, before posting you have to read them so every1 would know them and stop doing this kind of things
dzek (varez) Posted July 8, 2010 Posted July 8, 2010 well, i wasn't about stickies - everyone knows that nobody reads them.. it was about: look you !!!!!!!!!!!!! and i'm pretty sure that Metalhero didnt read that sticky anyway
m4rsje Posted July 8, 2010 Posted July 8, 2010 Thats why they should make a kind of system in the forums, if you want to post, You have to read them first, You cant go further for 30 sec's So you can read them!
dzek (varez) Posted July 8, 2010 Posted July 8, 2010 its going a bit offtopic, but.. i think there should be at least warning system.. for stealing scripts, acting like 11yo, flaming, going too deep OT (like this one ;>) etc
m4rsje Posted July 8, 2010 Posted July 8, 2010 its going a bit offtopic, but..i think there should be at least warning system.. for stealing scripts, acting like 11yo, flaming, going too deep OT (like this one ;>) etc I agree,
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