E-mail Posted August 7, 2011 Share Posted August 7, 2011 Hi iam making a New anti!-Fist Form My Server Please Fix it outputChatBox("No-TbGes|x[Dev-PoinT]x",255,255,0) function stopMinigunDamage ( attacker, weapon, bodypart ) if ( weapon == 0 ) then outputChatBox("Dontkill with Fist!!",0,255,) cancelEvent() end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), stopMinigunDamage) Link to comment
JR10 Posted August 7, 2011 Share Posted August 7, 2011 (edited) outputChatBox("No-TbGes|x[Dev-PoinT]x",255,255,0) function stopMinigunDamage( attacker, weapon, bodypart ) if ( weapon == 0 ) then outputChatBox("Dontkill with Fist!!",0,255,0) cancelEvent() end end addEventHandler ( "onClientPlayerDamage", root, stopMinigunDamage) Edited August 8, 2011 by Guest Link to comment
qaisjp Posted August 8, 2011 Share Posted August 8, 2011 code That was useless, lol. What doesn't work? Do /debugscript 3 and tell us your errors. Help us to help you! meta.xml <meta> <script src="c.lua" type="client/> </meta> c.lua outputChatBox("No-TbGes|x[Dev-PoinT]x",255,255,0) function stopMinigunDamage( attacker, weapon, bodypart ) if source === getLocalPlayer() then return end if ( weapon == 0 ) then outputChatBox("Dontkill with Fist!!",0,255,0) cancelEvent() end end addEventHandler ( "onClientPlayerDamage", root, stopMinigunDamage) Link to comment
JR10 Posted August 8, 2011 Share Posted August 8, 2011 Useless?? I bet the problem was that he didn't see the message. And that: if source === getLocalPlayer() then return end I never used it, and my client events still worked. Link to comment
E-mail Posted August 8, 2011 Author Share Posted August 8, 2011 The Msg show to the Victem not example If i hit JR10 the msg go to JR10 not me i want it show to me:) Link to comment
BinSlayer1 Posted August 8, 2011 Share Posted August 8, 2011 if source === getLocalPlayer() then return end does nobody notice there are 3 = ? lol you need to use 2 = Link to comment
JR10 Posted August 8, 2011 Share Posted August 8, 2011 Try: Server side: addEvent("sendMsgToAttacker", true) addEventHandler("sendMsgToAttacker", root, function() outputChatBox("Dontkill with Fist!!",source,0,255,0) end) Client side: outputChatBox("No-TbGes|x[Dev-PoinT]x",255,255,0) function stopMinigunDamage( attacker, weapon, bodypart ) if ( weapon == 0 ) then outputChatBox("Dontkill with Fist!!",0,255,0) cancelEvent() triggerServerEvent("sendMsgToAttacker", attacker) end end addEventHandler ( "onClientPlayerDamage", root, stopMinigunDamage) Both players will see the message. You can remove outputChatBox in the client side, so only the attacker see the message. 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