Ninja Posted March 25, 2012 Share Posted March 25, 2012 Can anyone edit this function that it works?? pls bindKey("ctrl","down",function(player) say("#005a5aWho want to fuck me in the ass?", player,0,0,0,true) end) Would be very nice thx... Link to comment
myyusuf Posted March 25, 2012 Share Posted March 25, 2012 say? it must be outPutChatBox if you want to write that on chat. Link to comment
Ninja Posted March 25, 2012 Author Share Posted March 25, 2012 if i make outputchatbox then can just the person who pressed ctrl see it in the chat i want that he write it.... Link to comment
CapY Posted March 25, 2012 Share Posted March 25, 2012 bindKey("ctrl","down", function(player) outputChatBox("#005a5aWho want to me in the ass?", player,0,0,0,true) end ) Only the player which pressed "CTRL" will see it. bindKey("ctrl","down", function() outputChatBox("#005a5aWho want to me in the ass?", root,0,0,0,true) end ) Everyone will see it, make sure to put it server-side. Link to comment
myyusuf Posted March 25, 2012 Share Posted March 25, 2012 bindKey("ctrl","down", function(player) outputChatBox("#005a5aWho want to me in the ass?", player,0,0,0,true) end ) Only the player which pressed "CTRL" will see it. bindKey("ctrl","down", function() outputChatBox("#005a5aWho want to me in the ass?", root,0,0,0,true) end ) Everyone will see it, make sure to put it server-side. he means that i think bindKey("ctrl","down", function() outputChatBox( getPlayerName ( player) .. ": says who want to me in the ass?", root,0,0,0,true) end ) Link to comment
CapY Posted March 25, 2012 Share Posted March 25, 2012 bindKey("ctrl","down", function(player) outputChatBox("#005a5aWho want to me in the ass?", player,0,0,0,true) end ) Only the player which pressed "CTRL" will see it. bindKey("ctrl","down", function() outputChatBox("#005a5aWho want to me in the ass?", root,0,0,0,true) end ) Everyone will see it, make sure to put it server-side. he means that i think bindKey("ctrl","down", function() outputChatBox( getPlayerName ( player) .. ": says who want to me in the ass?", root,0,0,0,true) end ) Your code won't work, "player" doesn't represents anything. bindKey("ctrl","down", function(player) outputChatBox( getPlayerName ( player) .. ": says who want to me in the ass?", root,0,0,0) end ) Link to comment
Ninja Posted March 25, 2012 Author Share Posted March 25, 2012 i want that it looks in the chat like" (player):Who wants to fuck me in..." if i use that bindKey("ctrl","down",function() outputChatBox("#005a5aWho want to me in the ass?",0,0,0,true) end ) .. in the chat stands just "Who wants to fuck me..." and with bindKey("ctrl","down",function(player) outputChatBox( getPlayerName ( player) .. ": says who want to me in the ass?", root,0,0,0) end ) it doesn't work... Link to comment
Aibo Posted March 25, 2012 Share Posted March 25, 2012 it doesnt work with getPlayerName because you're using clientside bindKey syntax in a clientside script. and first argument of handler function is not an element there. read wiki. anyway, this shit is retarded. Link to comment
jeremaniak Posted March 25, 2012 Share Posted March 25, 2012 it doesnt work with getPlayerName because you're using clientside bindKey syntax in a clientside script.and first argument of handler function is not an element there. read wiki. anyway, this :~ is retarded. anyway, this :~ is retarded. i agree Link to comment
CapY Posted March 25, 2012 Share Posted March 25, 2012 Cannot argue with that. Anyways: function funcInput(player) outputChatBox ( getPlayerName ( player ) " imma faggot, who wants to fuck me in the ass?!", root, 0, 255,0 ) end function bindTheKeys ( player ) bindKey ( player, "ctrl", "down", funcInput ) end Link to comment
Jaysds1 Posted March 25, 2012 Share Posted March 25, 2012 Try this: bindKey("lctrl","down",function(key,keystate) outputChatBox("#005a5aWho wants to me in the ass?",0,0,0,true) end) ctrl isn't a real key, so it's either rctrl or lctrl Link to comment
CapY Posted March 25, 2012 Share Posted March 25, 2012 I wasn't really looking is the key valid or not, just correcting the script. Link to comment
Ninja Posted March 25, 2012 Author Share Posted March 25, 2012 yeah and all that script doesn't work out of the one i told you earlier and that was without the name of the player so can anyone pls fix the script at the bottom with the player name who really know that it works pls? bindKey("ctrl","down",function() outputChatBox("#005a5aWho want to me in the ass?",0,0,0,true) end ) And i think it isnt retarded its just a script for a fun map ... Link to comment
Jaysds1 Posted March 25, 2012 Share Posted March 25, 2012 yeah and all that script doesn't work out of the one i told you earlier and that was without the name of the player so can anyone pls fix the script at the bottom with the player name who really know that it works pls?bindKey("ctrl","down",function() outputChatBox("#005a5aWho want to me in the ass?",0,0,0,true) end ) And i think it isnt retarded its just a script for a fun map ... Ok, I'm confused, Who 's name do you want to inserted? The player who did the command? or someone random? Link to comment
Ninja Posted March 25, 2012 Author Share Posted March 25, 2012 The player who pressed the button (here:lctrl) Link to comment
Jaysds1 Posted March 25, 2012 Share Posted March 25, 2012 try this: keys = {"lctrl","rctrl"} bindKey(keys,"down",function() outputChatBox(getPlayerName(localPlayer).."wants to know ' #005a5aWho wants to me in the ass? '",0,0,0,true) end) Link to comment
SMART:> Posted March 25, 2012 Share Posted March 25, 2012 function fanFunction() bindKey (source,"lctrl","down", function(player,key,state) outputChatBox (getPlayerName (player) .. "#005a5aWho want to me in the ass?",root,0,0,0,true) end ) end addEventHandler ("onPlayerJoin",getRootElement(),fanFunction) https://wiki.multitheftauto.com/wiki/BindKey exmaple: 3 took 1sec to edit.. Link to comment
Ninja Posted March 25, 2012 Author Share Posted March 25, 2012 Lol doesn't work i tested it client-sided and Server-sided... Link to comment
Castillo Posted March 25, 2012 Share Posted March 25, 2012 addEventHandler ( "onPlayerJoin", root, function ( ) bindKey ( source, "lctrl", "down", outputMessage ) end ) addEventHandler ( "onResourceStart", resourceRoot, function ( ) for index, player in ipairs ( getElementsByType "player" ) do bindKey ( player, "lctrl", "down", outputMessage ) end end ) function outputMessage ( thePlayer ) outputChatBox ( getPlayerName ( thePlayer ) .. "#005a5aWho want to me in the ass?", root, 0, 0, 0, true ) end Link to comment
Ninja Posted March 25, 2012 Author Share Posted March 25, 2012 server-sided or client-sided solidsnake(god)?? Link to comment
Ninja Posted March 25, 2012 Author Share Posted March 25, 2012 Thnak you solidsnake you are god.... btw its server-sided... Do you have skype? Link to comment
Castillo Posted March 25, 2012 Share Posted March 25, 2012 You're welcome. And yes, I do. Link to comment
Ninja Posted March 25, 2012 Author Share Posted March 25, 2012 Can i have pls?? i love people who can script... Link to comment
Castillo Posted March 25, 2012 Share Posted March 25, 2012 No, sorry, I only give it to my friends and people who want to buy scripts from me. Please, stop doing off-topic, use PM to ask personal questions. Link to comment
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