Jump to content

طلب اكواد


mouamle

Recommended Posts

Posted

السلام عليكم

ابي اسوي مود

مثلا أذا واحد كتب بالشات حرب

ينتقل لساحة الحرب

وش أحتاج

+ شكرا مقدما

1433031928821.jpg

Skype : Mouamle1

Telegram : @Mouamle

Posted
addEventHandler('onPlayerChat',root, 
        function(msg) 
                if string.find(msg,'حرب') then 
                    setElementPosition(localPlayer,x,y,z) 
        end 
    end 
) 

Posted
addEventHandler('onPlayerChat',root, 
        function(msg) 
                if string.find(msg,'حرب') then 
                    setElementPosition(localPlayer,x,y,z) 
        end 
    end 
) 

localPlayer --> source

CiTLh.png
Posted
addEventHandler('onPlayerChat',root, 
        function(msg) 
                if string.find(msg,'حرب') then 
                    setElementPosition(localPlayer,x,y,z) 
        end 
    end 
) 

localPlayer --> source

شكرا :*

1433031928821.jpg

Skype : Mouamle1

Telegram : @Mouamle

Posted

واذا ردت على اكثر من منطقة يعني واحد لساحة الحرب والثاني للمعرض

1433031928821.jpg

Skype : Mouamle1

Telegram : @Mouamle

Posted

تقدر تسويها بطريقه بسيطه ...

if string.find(msg,'حرب') then 
    .... 
elseif string.find(msg,'المعرض') then 
    .... 
end 

لأنه راح يبحث في الكلام الي كتبه اللاعب string.find انا من رأيي لا تستخدم

بمعنى لو كتب جمله وكتب في الجمله كلمه حرب راح ينقله حتى لو كان ما يقصد انه يروح ...

Sha67 سابقاً

Posted

هذا طلبكـ ...

addEventHandler("onPlayerChat", root, function(  msg  ) -- حدث عند الكتابه في الشات + وظيفة باسم 
        if string.find( msg,"حرب" ) then -- تحقق انه كتب في الشات حرب 
            setElementPosition( source, x, y, z ) -- x,y,z حط الاحداثيات الي ينتقل لها بدال 
        end -- اند الفنكشن 
    end -- اند الاف 
) -- قوس اغلاق الحدث 

واذا بتسوي اكثر من كلمه اذا كتبها ينتقل لـ مكان معين

انصحكـ تستخدم طريقة مختصرهـ وهي

elseif <-- @The Best مثل ماقال

مثال ...

if string.find( msg,"حرب" ) then -- تحقق انه كتب في الشات حرب 
  
elseif string.find( msg,"البدايه" ) then -- تحقق انه كتب في الشات البدايه 
  
end -- اند الاف 

elseif استخدم

كـ طريقه مختصرهـ

if <-- عشان اذا بتحط على كل مكان

end <-- بتزيد معها الاند

فقط شرح بسيط عشان تعرف تختصر ومايصير الكود هريسه

اتمنى اني افدتك وافدت كل القارئين

سلام : )

* There is no God but Allah, Mohammed is the Messenger Of Allah

Posted

تقدر تسويها بطريقه بسيطه ...

if string.find(msg,'حرب') then 
    .... 
elseif string.find(msg,'المعرض') then 
    .... 
end 

لأنه راح يبحث في الكلام الي كتبه اللاعب string.find انا من رأيي لا تستخدم

بمعنى لو كتب جمله وكتب في الجمله كلمه حرب راح ينقله حتى لو كان ما يقصد انه يروح ...

find يقدر يستخدم ذآ بدآل

addEventHandler("onPlayerChat" , root,  
function(  msg  ) -- وظيفة وداخل آلقوسين آرقمنت آلرسآلة 
  if tostring(msg) == "حرب" then -- بدآل آلبحث نحط آذآ كآنت آلرسآلة حرب ينفله مثل مآ قآل ذآ بست 
            setElementPosition( source, x, y, z ) -- x,y,z حط الاحداثيات الي ينتقل لها بدال 
  end -- نهآية آلتحقق 
end -- نهآية آلوظيفة 
) -- قوس إغلآق آلحدث 

Soon

MultiGame 4 in 1 (Drift, War, GangWar, Race) (..96%..)

Group SysTem (..43%..)

Turf SysTem (..70%..)

Jops (..44%..)

Vehicle SysTem (..55%..)

Level SysTem (..88%..)

Jail SysTem (..29%..)

Missions (..64%..)

Posted
addEventHandler('onPlayerChat',root, 
        function(msg) 
                if string.find(msg,'حرب') then 
                    setElementPosition(localPlayer,x,y,z) 
        end 
    end 
) 

localPlayer --> source

ما انتبهت , يسلمو

Posted

find يقدر يستخدم ذآ بدآل

addEventHandler("onPlayerChat" , root,  
function(  msg  ) -- وظيفة وداخل آلقوسين آرقمنت آلرسآلة 
  if tostring(msg) == "حرب" then -- بدآل آلبحث نحط آذآ كآنت آلرسآلة حرب ينفله مثل مآ قآل ذآ بست 
            setElementPosition( source, x, y, z ) -- x,y,z حط الاحداثيات الي ينتقل لها بدال 
  end -- نهآية آلتحقق 
end -- نهآية آلوظيفة 
) -- قوس إغلآق آلحدث 

مالها اي فايده tostring الداله...

message: A string representing the message typed into the chat.

Sha67 سابقاً

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...