yasin0 Posted May 30, 2017 Share Posted May 30, 2017 شباب كل عام وانتم بخير بس ليش مايشتغل مافي ولا خطاء بالدي بق local aTable = {} addEventHandler ("onPlayerChat",root,function(aType, aMessage) if aType == 0 and aMessage == "nob" then givePlayerMoney(aTable[source], 99) destroyElement (aTable[source]) end end); Link to comment
AHMED MOSTAFA Posted May 30, 2017 Share Posted May 30, 2017 Just now, yasin0 said: شباب كل عام وانتم بخير بس ليش مايشتغل مافي ولا خطاء بالدي بق local aTable = {} addEventHandler ("onPlayerChat",root,function(aType, aMessage) if aType == 0 and aMessage == "nob" then givePlayerMoney(aTable[source], 99) destroyElement (aTable[source]) end end); ما افهم مرة بالجداول بس وش فائدة destroyElement ? ولو تبي تعطي اللاعب اللي كتب رسالة معينة فلوس function onChat ( Type , Message ) if Type == 0 and Message == "test" then givePlayerMoney ( source, 99 ) end end addEventHandler ( "onPlayerChat", root, onChat )-- مب قادر استعمل التاج عندي مشاكل في الانترنت Link to comment
yasin0 Posted May 30, 2017 Author Share Posted May 30, 2017 Just now, Killer Project said: ما افهم مرة بالجداول بس وش فائدة destroyElement ? ولو تبي تعطي اللاعب اللي كتب رسالة معينة فلوس function onChat ( Type , Message ) if Type == 0 and Message == "test" then givePlayerMoney ( source, 99 ) end end addEventHandler ( "onPlayerChat", root, onChat )-- مب قادر استعمل التاج عندي مشاكل في الانترنت ماشتغل لكن انا ابيها بالجدوال + مافي ولا خطاء بالدي بق Link to comment
^iiEcoo'x_) Posted May 30, 2017 Share Posted May 30, 2017 انت عاكس بين نوع الرسالة والمسج , راجع ارقيومنات الحدث وتعرف ايش اقصد Link to comment
#STZ Posted May 30, 2017 Share Posted May 30, 2017 function aMoney(plr,text) if string.find(text,"فلوس") then givePlayerMoney(plr,5000) end end addEventHandler("onPlayerChat", getRootElement(), aMoney) Link to comment
#BrosS Posted May 30, 2017 Share Posted May 30, 2017 2 minutes ago, #STZ said: function aMoney(plr,text) if string.find(text,"فلوس") then givePlayerMoney(plr,5000) end end addEventHandler("onPlayerChat", getRootElement(), aMoney) string.find م يحتاج تعرف اللاعب و Link to comment
#STZ Posted May 30, 2017 Share Posted May 30, 2017 @#BrosS ادري ممكن يكون سورس لاكن string.find عشان لو ضمن الكلام كلمة فلوس يعطيه علي العموم ممكن يسوي تحقق اذا تكست هي فلوس يعطيه Link to comment
#BrosS Posted May 30, 2017 Share Posted May 30, 2017 Just now, #STZ said: @#BrosS ادري ممكن يكون سورس لاكن string.find عشان لو ضمن الكلام كلمة فلوس يعطيه علي العموم ممكن يسوي تحقق اذا تكست هي فلوس يعطيه لو مثلا اللاعب قال روح للمهمات عشان تجيب فلوس يعطيه فلوس بدون ماطلب Link to comment
yasin0 Posted May 30, 2017 Author Share Posted May 30, 2017 (edited) لا خلاص حليتها شكرا على مساعدتكم شباب ابيكم بموضوع سويته توني Edited May 30, 2017 by yasin0 Link to comment
AHMED MOSTAFA Posted May 30, 2017 Share Posted May 30, 2017 function onChat ( Message , messageType ) if messageType == 0 and Message == "test" then givePlayerMoney ( source, 99 ) end end addEventHandler ( "onPlayerChat", root, onChat ) Link to comment
^iiEcoo'x_) Posted May 30, 2017 Share Posted May 30, 2017 3 hours ago, #STZ said: function aMoney(plr,text) if string.find(text,"فلوس") then givePlayerMoney(plr,5000) end end addEventHandler("onPlayerChat", getRootElement(), aMoney) راجع هذا الموضوع onPlayerChat 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