#Brave Heart Posted November 3, 2013 Share Posted November 3, 2013 السلام عليكم ,, اليوم سويت كود بس مدري وش المشكلة addEventHandler("onClientGUIClick",GUIEditor.button[6], function () local sel = guiGridListGetSelectedItem(gridList) if sel ~= -1 then local player = getPlayerFromName(guiGridListGetItemText(gridList,sel,1)) if isElement(player) then triggerServerEvent("wanted1",localPlayer,player) end end end ) ذا كلينت addEvent("wanted1",true) addEventHandler("wanted1",root, function (thePlayer) if isElement(thePlayer) then setPlayerWantedLevel ( thePlayer, 1 ) outputChatBox ( getPlayerName ( thePlayer ) .. " has become a 1 star" ) end end ) وذا سيرفر Link to comment
#DRAGON!FIRE Posted November 3, 2013 Share Posted November 3, 2013 السلام عليكم ,,اليوم سويت كود بس مدري وش المشكلة addEventHandler("onClientGUIClick",GUIEditor.button[6], function () local sel = guiGridListGetSelectedItem(gridList) if sel ~= -1 then local player = getPlayerFromName(guiGridListGetItemText(gridList,sel,1)) if isElement(player) then triggerServerEvent("wanted1",localPlayer,player) end end end ) ذا كلينت addEvent("wanted1",true) addEventHandler("wanted1",root, function (thePlayer) if isElement(thePlayer) then setPlayerWantedLevel ( thePlayer, 1 ) outputChatBox ( getPlayerName ( thePlayer ) .. " has become a 1 star" ) end end ) وذا سيرفر addEventHandler("onClientGUIClick",GUIEditor.button[6], function () Player = guiGridListGetItemText ( gridList, guiGridListGetSelectedItem ( gridList ), 1 ) if Player then triggerServerEvent("wanted1",localPlayer,tostring(Player)) end end) # سيرفر ما اشوف فيه اي خطأ , والتحقق خله # getPlayerFromName مأ ادري حطها بسيرفر ممكن ذذ Link to comment
3NAD Posted November 3, 2013 Share Posted November 3, 2013 -- Client Side addEventHandler("onClientGUIClick",GUIEditor.button[6], function ( ) local sel, col = guiGridListGetSelectedItem(gridList) if sel ~= -1 then triggerServerEvent("wanted1",localPlayer,tostring(guiGridListGetItemText(gridList,sel,1))) end end , false ) -- Server Side addEvent("wanted1",true) addEventHandler("wanted1",root, function ( name ) local player = getPlayerFromName ( name ) if player then setPlayerWantedLevel ( player, 1 ) outputChatBox ( getPlayerName ( player ) .. " has become a 1 star", source ) end end ) Link to comment
SKIDROW Posted November 4, 2013 Share Posted November 4, 2013 -- Server Side addEvent("wanted1",true) addEventHandler("wanted1",root, function ( name ) local player = getPlayerFromName ( name ) if player then setPlayerWantedLevel ( player, 1 ) outputChatBox ( getPlayerName ( player ) .. " has become a 1 star", source) end end ) 1- ليش السكربت معرف player وتحط في الرسالة source 2- طيب اذا مضمون الرسالة يطلع للاعبين يعني مثلا عناد عنده نجمة انت كذا الرسالة تطلع للشخص نفسه ماتطلع للجميع # Link to comment
jafar Posted November 4, 2013 Share Posted November 4, 2013 -- Server Side addEvent("wanted1",true) addEventHandler("wanted1",root, function ( name ) local player = getPlayerFromName ( name ) if player then setPlayerWantedLevel ( player, 1 ) outputChatBox ( getPlayerName ( player ) .. " has become a 1 star", source) end end ) 1- ليش السكربت معرف player وتحط في الرسالة source 2- طيب اذا مضمون الرسالة يطلع للاعبين يعني مثلا عناد عنده نجمة انت كذا الرسالة تطلع للشخص نفسه ماتطلع للجميع # player = اللاعب الي زادت نجومه source = الأدمن أو المتسبب في زيادة النجوم Link to comment
SKIDROW Posted November 4, 2013 Share Posted November 4, 2013 بس في خطا بالسكربت , الحين هو يبي الرسالة تظهر لمين ؟ 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