WTF_ Posted August 23, 2017 Share Posted August 23, 2017 addEventHandler ( "onMarkerHit", f1 , function () local ROB = createTeam ( Rob_Bank ) setPlayerTeam ( source , ROB ) end ) [18:42:39] WARNING: oppsss\s.lua:154: Bad argument @ 'createTeam' [Expected string at argument 1, got nil] [18:42:39] WARNING: oppsss\s.lua:155: Bad argument @ 'setPlayerTeam' [Expected player at argument 1, got marker] بيقول لي ذي المشاكل بالله مساعدة شباب Link to comment
#BrosS Posted August 23, 2017 Share Posted August 23, 2017 Rob_Bank غير معرفة واذا قصدك ذا اسم التيم حطها داخل سترينج " مزدوجتين" صحسصصسزي Link to comment
WTF_ Posted August 23, 2017 Author Share Posted August 23, 2017 (edited) Just now, #BrosS said: Rob_Bank غير معرفة واذا قصدك ذا اسم التيم حطها داخل سترينج " مزدوجتين" صحسصصسزي شكرا لك بروس بس شوف بيقول مشكلة اخرى [18:50:24] WARNING: oppsss\s.lua:155: Bad argument @ 'setPlayerTeam' [Expected player at argument 1, got marker] Edited August 23, 2017 by WTF_ Link to comment
Doffy Posted August 23, 2017 Share Posted August 23, 2017 addEventHandler ( "onMarkerHit", f1 , function () local ROB = createTeam ( "Rob_Bank", 255,0,0 ) setPlayerTeam ( source , ROB ) end ) Link to comment
WTF_ Posted August 23, 2017 Author Share Posted August 23, 2017 للحين بيقول لي مشكلة [18:52:24] WARNING: oppsss\s.lua:155: Bad argument @ 'setPlayerTeam' [Expected player at argument 1, got marker] Link to comment
Omoi Posted August 23, 2017 Share Posted August 23, 2017 تفضل اخوي addEventHandler ( "onMarkerHit", f1 , function (hitPlayer) local ROB = createTeam ( "Rob_Bank", 255,0,0 ) setPlayerTeam ( hitPlayer , ROB ) end ) Link to comment
Master_MTA Posted August 23, 2017 Share Posted August 23, 2017 addEventHandler ( "onMarkerHit", f1 , function (hitPlayer) if not getElementType(hitPlayer)=='player' then return end local ROB = createTeam ( "Rob_Bank", 255,0,0 ) setPlayerTeam ( hitPlayer , ROB ) end ) Link to comment
Omoi Posted August 23, 2017 Share Posted August 23, 2017 1 minute ago, Master_MTA said: addEventHandler ( "onMarkerHit", f1 , function (hitPlayer) if not getElementType(hitPlayer)=='player' then return end local ROB = createTeam ( "Rob_Bank", 255,0,0 ) setPlayerTeam ( hitPlayer , ROB ) end ) شكرا ع التصحيح نسيت هالشي 1 Link to comment
!#NssoR_) Posted August 23, 2017 Share Posted August 23, 2017 (edited) انا ماني فاهم كيف تحطون كود إنشاء التيم داخل حدث لمس الماركر local ROB = createTeam ( "Rob_Bank", 255,0,0 ) addEventHandler ( "onMarkerHit", f1 , function (element) if ( getElementType(element) == 'player' ) then if ( getPlayerTeam(element) ~= ROB ) then setPlayerTeam ( element , ROB ) else outputChatBox('You are already in the Team !',element,255,0,0,true) end end end) Edited August 23, 2017 by !#NssoR_) خطأ إملائي xD 1 Link to comment
Master_MTA Posted August 23, 2017 Share Posted August 23, 2017 5 minutes ago, !#NssoR_) said: انا ماني فاهم كيف تحطون كود إنشاء التيم داخل حدث لمس الماركر local ROB = createTeam ( "Rob_Bank", 255,0,0 ) addEventHandler ( "onMarkerHit", f1 , function (element) if ( getElementType(element) == 'player' ) then if ( getPlayerTeam(element) ~= ROB ) then setPlayerTeam ( element , ROB ) else outputChatBox('You are already in the Team !',element,255,0,0,true) end end end) ? ما بتصير مشكله لو التيم موجود من قبل بيرجع false على كل حال Link to comment
+Source|> Posted August 23, 2017 Share Posted August 23, 2017 تفضلل local f1 = createMarker( x, y, z - 1, "cylinder", 1.5, 255, 0, 0 ) local ROB = createTeam ( "Rob_Bank", 255, 0, 0 ) addEventHandler( "onMarkerHit", root, function ( player ) if source == f1 then setPlayerTeam ( player , ROB ) end end ) Link to comment
iMr.WiFi..! Posted August 23, 2017 Share Posted August 23, 2017 2 hours ago, Master_MTA said: ? ما بتصير مشكله لو التيم موجود من قبل بيرجع false على كل حال وبيخرب الكود ._. لأنك مستعمل setPlayerTeam .. وحاط التيم واذا في التيم راح يرجع فولس وبيحط بالارقمنت الثاني فولس وبيخرب الكود .. 1 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