Me[Z]oO Posted April 5, 2016 Share Posted April 5, 2016 function chatBox(plr,mezo) outputChatBox(plr.."has Slapped By "..getPlayerName (source).."Reason:"..mezo, 255, 0, 0, false) end addEvent("ChatBox_playerHaveSlap", true) addEventHandler("ChatBox_playerHaveSlap", root, chatBox) #Client Side addEventHandler("onClientGUIClick",root, function ( ) if ( source == SlapButton ) then if ( guiGridListGetSelectedItem(pList ) ~= -1 ) then local plr = guiGridListGetItemText(pList ,guiGridListGetSelectedItem(pList ),1) local myPlayer = getPlayerFromName ( plr ) local mezo = guiGetText ( Edit ) -- اسم الايديت triggerServerEvent("ChatBox_playerHaveSlap", localPlayer, plr, mezo) setElementHealth(myPlayer, 0, true) guiSetVisible(SlapWnd,false) guiSetInputEnabled(false) showCursor(false) end end end ) Link to comment
Maksoud Posted April 5, 2016 Author Share Posted April 5, 2016 addEventHandler("onClientGUIClick",root, function ( ) if ( source == SlapButton ) then if ( guiGridListGetSelectedItem(pList ) ~= -1 ) then local plr = guiGridListGetItemText(pList ,guiGridListGetSelectedItem(pList ),1) local myPlayer = getPlayerFromName ( plr ) local mezo = guiGetText ( Edit ) triggerServerEvent("ChatBox_playerHaveSlap", resourceRoot, plr, mezo) setElementHealth(myPlayer, 0, true) guiSetVisible(SlapWnd,false) guiSetInputEnabled(false) showCursor(false) end end end ) العيب من ال Server Side على حسب ما بيقول الدي بق Link to comment
Me[Z]oO Posted April 5, 2016 Share Posted April 5, 2016 addEventHandler("onClientGUIClick",root, function ( ) if ( source == SlapButton ) then if ( guiGridListGetSelectedItem(pList ) ~= -1 ) then local plr = guiGridListGetItemText(pList ,guiGridListGetSelectedItem(pList ),1) local myPlayer = getPlayerFromName ( plr ) local mezo = guiGetText ( Edit ) triggerServerEvent("ChatBox_playerHaveSlap", resourceRoot, plr, mezo) setElementHealth(myPlayer, 0, true) guiSetVisible(SlapWnd,false) guiSetInputEnabled(false) showCursor(false) end end end ) العيب من ال Server Side على حسب ما بيقول الدي بق عدلت الكود فوق ووريني وش يقول الدي بق Link to comment
Maksoud Posted April 5, 2016 Author Share Posted April 5, 2016 شوف لما يكون الكود كدا : addEventHandler("onClientGUIClick",root, function ( ) if ( source == SlapButton ) then if ( guiGridListGetSelectedItem(pList ) ~= -1 ) then local plr = guiGridListGetItemText(pList ,guiGridListGetSelectedItem(pList ),1) local myPlayer = getPlayerFromName ( plr ) local mezo = guiGetText ( Edit ) -- اسم الايديت triggerServerEvent("ChatBox_playerHaveSlap", resourceRoot, plr, mezo) setElementHealth(myPlayer, 0, true) guiSetVisible(SlapWnd,false) guiSetInputEnabled(false) showCursor(false) end end end ) بيقول ERROR : Police\Server.lua:33: attempt to concatenate a boolean value Link to comment
N3xT Posted April 5, 2016 Share Posted April 5, 2016 # Server : addEvent("slap",true) addEventHandler("slap",root, function (plr,reasons) outputChatBox(plr.." Has Slapped By "..getPlayerName (source).." Reason : "..reasons,source, 255, 0, 0, false) end # Client : addEventHandler("onClientGUIClick",root, function ( ) if ( source == SlapButton ) then if ( guiGridListGetSelectedItem(pList ) ~= -1 ) then local plr = guiGridListGetItemText(pList ,guiGridListGetSelectedItem(pList ),1) local player = getPlayerFromName ( plr ) local reasons = guiGetText ( Edit ) -- اسم الايديت triggerServerEvent("slap", root, plr, reasons) setElementHealth(player, 0) guiSetVisible(SlapWnd,false) guiSetInputEnabled(false) showCursor(false) end end end ) Link to comment
Me[Z]oO Posted April 5, 2016 Share Posted April 5, 2016 # Server : addEvent("slap",true) addEventHandler("slap",root, function (plr,reasons) outputChatBox(plr.." Has Slapped By "..getPlayerName (source).." Reason : "..reasons,source, 255, 0, 0, false) end # Client : addEventHandler("onClientGUIClick",root, function ( ) if ( source == SlapButton ) then if ( guiGridListGetSelectedItem(pList ) ~= -1 ) then local plr = guiGridListGetItemText(pList ,guiGridListGetSelectedItem(pList ),1) local player = getPlayerFromName ( plr ) local reasons = guiGetText ( Edit ) -- اسم الايديت triggerServerEvent("slap", root, plr, reasons) setElementHealth(player, 0) guiSetVisible(SlapWnd,false) guiSetInputEnabled(false) showCursor(false) end end end ) بالكلنت مسوي التريقر root ????? بدلها بلوكل بلاير Link to comment
N3xT Posted April 5, 2016 Share Posted April 5, 2016 # Server : addEvent("slap",true) addEventHandler("slap",root, function (plr,reasons) outputChatBox(plr.." Has Slapped By "..getPlayerName (source).." Reason : "..reasons,source, 255, 0, 0, false) end # Client : addEventHandler("onClientGUIClick",root, function ( ) if ( source == SlapButton ) then if ( guiGridListGetSelectedItem(pList ) ~= -1 ) then local plr = guiGridListGetItemText(pList ,guiGridListGetSelectedItem(pList ),1) local player = getPlayerFromName ( plr ) local reasons = guiGetText ( Edit ) -- اسم الايديت triggerServerEvent("slap", localPlayer, plr, reasons) setElementHealth(player, 0) guiSetVisible(SlapWnd,false) guiSetInputEnabled(false) showCursor(false) end end end ) ^ جرب الحين ، غلط ب لوكال بلاير لأني نسخت الكود سريع سريع وما عدلته Link to comment
Maksoud Posted April 5, 2016 Author Share Posted April 5, 2016 #Server Side ')' expected (to close '(' ate line 33) near '' الدي بق ^ Link to comment
Mr.CoR Posted April 5, 2016 Share Posted April 5, 2016 شوفلما يكون الكود كدا : addEventHandler("onClientGUIClick",root, function ( ) if ( source == SlapButton ) then if ( guiGridListGetSelectedItem(pList ) ~= -1 ) then local plr = guiGridListGetItemText(pList ,guiGridListGetSelectedItem(pList ),1) local myPlayer = getPlayerFromName ( plr ) local mezo = guiGetText ( Edit ) -- اسم الايديت triggerServerEvent("ChatBox_playerHaveSlap", resourceRoot, plr, mezo) setElementHealth(myPlayer, 0, true) guiSetVisible(SlapWnd,false) guiSetInputEnabled(false) showCursor(false) end end end ) بيقول ERROR : Police\Server.lua:33: attempt to concatenate a boolean value العيب من ملف السيرفر السطر رقم 33 اطرح السطر رقم 33 بملف السيرفر Link to comment
Me[Z]oO Posted April 5, 2016 Share Posted April 5, 2016 #Server Side ')' expected (to close '(' ate line 33) near '' الدي بق ^ شوفلما يكون الكود كدا : addEventHandler("onClientGUIClick",root, function ( ) if ( source == SlapButton ) then if ( guiGridListGetSelectedItem(pList ) ~= -1 ) then local plr = guiGridListGetItemText(pList ,guiGridListGetSelectedItem(pList ),1) local myPlayer = getPlayerFromName ( plr ) local mezo = guiGetText ( Edit ) -- اسم الايديت triggerServerEvent("ChatBox_playerHaveSlap", resourceRoot, plr, mezo) setElementHealth(myPlayer, 0, true) guiSetVisible(SlapWnd,false) guiSetInputEnabled(false) showCursor(false) end end end ) بيقول ERROR : Police\Server.lua:33: attempt to concatenate a boolean value اطرح ملف السيرفر كامل Link to comment
N3xT Posted April 5, 2016 Share Posted April 5, 2016 # Server : addEvent("slap",true) addEventHandler("slap",root, function (plr,reasons) outputChatBox(plr.." Has Slapped By "..getPlayerName (source).." Reason : "..reasons,source, 255, 0, 0, false) end ) Link to comment
Me[Z]oO Posted April 5, 2016 Share Posted April 5, 2016 اشتغل شباب الخطا من عند بﻻك نيكست حاطط root بدل localPlayer بالتوفيق Link to comment
N3xT Posted April 5, 2016 Share Posted April 5, 2016 اشتغل شباب الخطا من عند بﻻك نيكست حاطط root بدل localPlayer بالتوفيق صلحت كودي وعطيته هو وجربه واشتغل ، وانت باقي تقول الخطأ عندي Link to comment
Maksoud Posted April 5, 2016 Author Share Posted April 5, 2016 شباب الخطأ كان فى القوس الكان فى اخر الكود حق السيرفر addEvent("slap",true) addEventHandler("slap",root, function (plr,reasons) outputChatBox(plr.." Has Slapped By "..getPlayerName (source).." Reason : "..reasons,source, 255, 0, 0, false) end ) سطر 6 ما كان موجود Link to comment
N3xT Posted April 5, 2016 Share Posted April 5, 2016 شباب الخطأ كان فى القوس الكان فى اخر الكود حق السيرفر addEvent("slap",true) addEventHandler("slap",root, function (plr,reasons) outputChatBox(plr.." Has Slapped By "..getPlayerName (source).." Reason : "..reasons,source, 255, 0, 0, false) end ) سطر 6 ما كان موجود يب عدلته لك بعدها Link to comment
Mr.CoR Posted April 5, 2016 Share Posted April 5, 2016 #Server Side ')' expected (to close '(' ate line 33) near '' الخطأ كان بالاقواس ي ميزو ماكان خطأ Root or localPlayer خخخ 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