Jump to content

Tete omar

Members
  • Posts

    3,267
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by Tete omar

  1. The source is the player who just logged in , so i'm getting his name & account , and i don't see any problem in my code, and 'v' is the players who has the same data type, so i'm notifying them that a member of them has just logged in
  2. I'm sorry for dis-appearing the rest of the code, but that's exactly what i used: for i,v in ipairs(getElementsByType("player")) do local account=getPlayerAccount(v) if(getPlayerGangName(v))then triggerClientEvent(v,"memberLoggedIn",v,getAccountName(account),getPlayerName(source)) end end I'm notifying the other players who has the same data name that a player(who has the same data name) is joined by someway.
  3. Sorry forget about getPlayerDataName this is the code which has all focus for i,v in ipairs(getElementsByType("player")) do if(getPlayerGangName(v))then -- yet again ..
  4. Thanks cadu12 But i have another problem for i,v in ipairs(getElementsByType("player")) do if(getPlayerDataName(v))then -- yet again .. I've made a function that gets the data from the players whose are having this data , but it's results nil value and here's the code local function getPlayerGangName(player) local account=getPlayerAccount(player) if(account~=false)then return tostring(getAccountData(account,"data")) else return false end return true end
  5. Why are you asking all these silly questions? , of course it'll return a string contains the data you've added to just that nothing else of what you expect, and next time read the wiki.
  6. Hi , i have a problem with getting all accounts using getAccounts and pick the accounts which has a specific data , but it's just says: bad argument @ 'getPlayerAccount' [Expected element at argument 1] Here's my code for i,v in ipairs(getAccounts()) do local account=getPlayerAccount(v) -- anyway, i won't show the rest .. Is there any way to solve that problem?
  7. منورين جميعاً أي استفسار ؟؟ لاحد يتردد
  8. But the bathroom is to eliminate what the human body needs to , i prefer pool , i get a horrible ideas in it .
  9. يا سلاآآم , الموضوع نور , الله يسلمك
  10. والله كلام سليم 100% يا سعد +كل ارقام العالم إلى ما لا نهاية
  11. Then you can use: setAccountPassword instead of knowing his account password , and tell the 3rd person about the password you've changed using this function.
  12. السلام عليكم ورحمة الله وبركاته , حبيت اسويلكم موضوع شرح لكلمة local أولاً لوكال يعني شي لوكال على الفنكشن او الشروط مثل if elseif function الوكال يعني شي محلي على الفنكشن , اقصد مثلاً اذا تبي تختصر getPlayerMoney -- العثور على فلوس اللاعب أكيد راح تسويلها اختصار مثلاً money = getPlayerMoney(player) لا تحسب ان البلاير هنا شي مفروض , هذا فقط كـ مثال , لان البلاير يعتمد على الحدث على أية حال .. المهم : مثلاً حنا نبي نسوي اذا مات يعطيك فلوس addEventHandler("onPlayerWasted",root, -- عندما يموت اللاعب function() --[[ ال source في هالحدث هو اللاعب الذي مات ]] local money = getPlayerMoney(source) -- الحين الوكال راح يكون محلي على هالكود فقط setPlayerMoney(source,money+5) -- يزود فلوس اللاعب اللي مات 5 دولار end ) الوكال هنا راح يكون لوكال على ال function الي فوق مثل ما نشوف ما فهمت ؟ , اعطيك مثال آخر addEventHandler("onPlayerLogin",root, function() --[[ ال source في هالحدث هو اللاعب الذي دخل حسابه ]] if( getPlayerMoney( source ) == 5)then -- اذا فلوس اللاعب 5 --[[ الحين هذا لوكال على ال if اللي فوق v ]] local nass = "فلوسك 5 دولار" outputChatBox(nass,source) -- هنا حطيت سورس عشان النص يشوفه اللاعب اللي دخل فقط هذا اذا كان عنده 5 دولار elseif( getPlayerMoney( source ) == 10 )then -- آخر اذا , فلوس اللاعب اللي دخل 10 --[[ الحين هذا لوكال على ال elseif اللي فوق v ]] local nass = "فلوسك 10 دولار" outputChatBox(nass,source) end end ) الحين هنا لا تخاف لان nass لوكال يعني ماراح يكون فيه تشابه اسماء عشان هي لوكال على ال if فقط أي سؤال أي استفسار , لا تتردد في الرد هنا !! واتمنى ان اكون افدتكم وياليت لكل اللي مهو فاهم يسوي يرد هنا ويقول وش اللي ما فهمه بالتحديد واللي يبي يضيف شي على الشرح , يا هلا وسهلا انتظروني في شرح آخر
  13. كلامك سليم , بعضهم ما يعرف للجداول انا ان شاء الله قريباً بسوي موضوع عن تعلم الجداول
  14. مثال local type_ = {1, 2, 3} -- انواع الشات local badwords = {"test"} -- الكلمات السيئة addEventHandler("onPlayerChat",root, function( msg, Messagetype ) if ( Messagetype == type_[Messagetype] ) then -- اذا كان الشات أياً من انواع شات الام تي اي , مثال , /me for i, v in ipairs ( badwords ) do -- نجيب جميع الكلمات اللي بالجدول الي فوق if ( msg == v )then -- اذا كان الكلمة الي قالها من الكلممات في الجدول الي فوق cancelEvent() -- نغلق الحدث end end end end ) انا مو متآكد من المثال لاكن جربه , واكتب بالشات test
  15. لما تطلب كود في منتدى scripting يعطونك الوظايف اللي تبيها او مثال , ما يعطونك الشي الي تبيه وصح كلامك ياليت تابل يسوي قانون عدم طلب الكودات , مثلاً اللي يبي يسآل كيف يسوي الطريقة الخاطئة الطريقة الصحيحة الحين حنا وش فهمنا في " الطريقة الخاطئة " عشان اللاعب يصدم بالماركر طيب , ووين احداثياتها اللي تبيها , ووش نوعها , ووش لونها ؟؟؟ ثانياً المفروض ماحد يرد عليه ولا فقط يعطيه الوظايف اللي يحتاجها او مثال بسيط
  16. - 1 use: functions warpPedIntoVehicle events onPlayerJoin - 2 functions createMarker events onMarkerHit edit : dunno what's the rest, maybe the guys will help you sooner.
  17. انا ما بعطيك الكود كامل لاكن يكفي مثال , addEventHandler("onResourceStart",resourceRoot, -- عند بدأ تشغيل الريسورس function() for i,v in ipairs(getElementsByType("vehicle")) do -- يجيب كل السيارات الي بسيرفرك createBlipAttachedTo(v,55) -- يحط لها بلب السيارة end end ) لا تعطيني سمكة , بل علمني كيف اصطاد
  18. getElementsByType + createBlipAttachedTo
  19. Unless he made a login panel and used guiGetText in the password content , but how low would he go.
  20. yes , event 'onClientResourceStart' is triggered when the resource starts to run and these 2 functions will be happened when the resource starts ..
  21. doStuff() doMoreStuff() is a functions that happens when the resource start just like function doStuff() outputChatBox("Resouce started") end function doMoreStuff() outputChatBox("Welcome to this server!") end that was an example;)
  22. شي طبيعي , كل مرة يجينا واحد جديد بالمنتدى , ويسآل ويسوي 5000000000000 موضوع طلب للمساعدة شهر شهرين صار نص نص شهر شهرين صار خبير شهر شهرين يساعد شهر شهرين ترك المنتدى واعتزل اللعبة هذا العايدي حق منتدانا العربي
×
×
  • Create New...