MJNON Posted October 30, 2013 Posted October 30, 2013 السلام عليكم ابي كوود الى هو مثل اذا كتبت في الشات "ابي سياره" الشخص الي كتب في الشات يعطيه سياره والسلام MySkype:ali_7ammadah BBM:73E90EF9 My name :MJNON
Stranger Posted October 31, 2013 Posted October 31, 2013 وعليكم السلام سوي جدول وحط فيه الكلمات الي تبيها وسوي لوب + استخدم هذي الاكواد string.find getElementPosition createVehicle warpPedIntoVehicle
فاّرس Posted October 31, 2013 Posted October 31, 2013 onPlayerChat string.find getElementPosition table isElement destroyElement createVehicle warpPedIntoVehicle Sha67 سابقاً
|~| ALCKASER |~| Posted November 1, 2013 Posted November 1, 2013 addEventHandler ( "onPlayerChat",root, function ( msg, msgType ) if ( msg == "الكلام الذي تريده يكتبه بالشات ويعطيه" and msgType == 0 ) then end end ) warpPedIntoVehicle createVehicle i am Scripter Servers MTA Add Skype : alckaser14 Welcome To Server KFO ....
فاّرس Posted November 1, 2013 Posted November 1, 2013 ^ اظن انه يبي يبحث مثلا واحد كاتب ابي سيارة سريع كذا ذذ vehicle = {} addEventHandler('onPlayerChat',root,function(msg) if string.find(msg,'ابي سيارة') then if isElement(vehicle[source]) then destroyElement(vehicle[source]) end vehicle[source] = createVehicle(455,unpack({getElementPosition(source)})) warpPedIntoVehicle(source,vehicle[source]) end end ) Sha67 سابقاً
3NAD Posted November 1, 2013 Posted November 1, 2013 الطريقة غير مجربة ** سويت لك كود يسهل عملية طلبك وهو ان وجد الكلمة راح ينفذ الإيفنت Words = { ["ابي سيارة"] = "onOrderVehicle"; ["ابي سلاح"] = "onOrderWeapon"; --[ "Word" ] = "Event"; }; addEventHandler ( "onPlayerChat", root, function ( msg, type ) if type == 0 then for word, event in pairs ( Words ) do if string.find ( msg, tostring(word) ) then triggerEvent ( tostring(event), source ) end end end end ) و عادي تخلي الإيفنت بـ مود و جدول الكلمات مع كوده بـ مود منفرد Vehicles = { }; addEvent ( "onOrderVehicle", true ) addEventHandler ( "onOrderVehicle", root, function ( ) local x, y, z = getElementPosition ( source ) if Vehicles[source] then if isElement ( Vehicles[source] ) then destroyElement ( Vehicles[source] ) end Vehicles[source] = nil end Vehicles[source] = createVehicle ( math.random ( 400, 611 ), x, y+1, z+1 ) setTimer ( warpPedIntoVehicle, 100, 1, source, Vehicles[source] ) end ) addEvent ( "onOrderWeapon", true ) addEventHandler ( "onOrderWeapon", root, function ( ) giveWeapon ( source, math.random ( 22, 38 ), 60, true ) end )
MJNON Posted November 16, 2013 Author Posted November 16, 2013 الطريقة غير مجربة **سويت لك كود يسهل عملية طلبك وهو ان وجد الكلمة راح ينفذ الإيفنت Words = { ["ابي سيارة"] = "onOrderVehicle"; ["ابي سلاح"] = "onOrderWeapon"; --[ "Word" ] = "Event"; }; addEventHandler ( "onPlayerChat", root, function ( msg, type ) if type == 0 then for word, event in pairs ( Words ) do if string.find ( msg, tostring(word) ) then triggerEvent ( tostring(event), source ) end end end end ) و عادي تخلي الإيفنت بـ مود و جدول الكلمات مع كوده بـ مود منفرد Vehicles = { }; addEvent ( "onOrderVehicle", true ) addEventHandler ( "onOrderVehicle", root, function ( ) local x, y, z = getElementPosition ( source ) if Vehicles[source] then if isElement ( Vehicles[source] ) then destroyElement ( Vehicles[source] ) end Vehicles[source] = nil end Vehicles[source] = createVehicle ( math.random ( 400, 611 ), x, y+1, z+1 ) setTimer ( warpPedIntoVehicle, 100, 1, source, Vehicles[source] ) end ) addEvent ( "onOrderWeapon", true ) addEventHandler ( "onOrderWeapon", root, function ( ) giveWeapon ( source, math.random ( 22, 38 ), 60, true ) end ) اخوي عناد كيف يعني اخلي الإيفنت بمود و الجدول بمود MySkype:ali_7ammadah BBM:73E90EF9 My name :MJNON
فاّرس Posted November 16, 2013 Posted November 16, 2013 يقصد تقدر تستخدم الايفنت خارج المود الي فيه كود عناد, بشرط يكون المود شغال Sha67 سابقاً
MJNON Posted November 17, 2013 Author Posted November 17, 2013 يعني اسوي مودين علشان يشتغل مود الي فيه الجدول لازم اشغل مود الي فيه الايفنت MySkype:ali_7ammadah BBM:73E90EF9 My name :MJNON
MJNON Posted November 18, 2013 Author Posted November 18, 2013 تسلموو عناد MySkype:ali_7ammadah BBM:73E90EF9 My name :MJNON
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