Maksoud Posted April 5, 2016 Share Posted April 5, 2016 السلام عليكم و رحمة الله و بركاته لو سمحت ابى كود سحب سيارة اللاعب مع العلم ان الشرطى بيختار من القريد ليست و يسحب السيارة Link to comment
iMr.WiFi..! Posted April 5, 2016 Share Posted April 5, 2016 وعليكم سلام ورحمة الله وبركاته ~ -- يشيل السيارة نهائياً destroyElement -- اذا كان محدد شيء من الجريد ليست guiGridListGetSelectedItem Link to comment
N3xT Posted April 5, 2016 Share Posted April 5, 2016 # Server : addEvent("destroy",true) addEventHandler("destroy",root, function (plr) outputChatBox(plr.." Destroyed His Car By "..getPlayerName (source).."",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 ) triggerServerEvent("destroy", localPlayer, plr) destroyElement ( getPedOccupiedVehicle(player) ) end end end ) Link to comment
Maksoud Posted April 5, 2016 Author Share Posted April 5, 2016 ما ظبط addEventHandler("onClientGUIClick",root, function ( ) if ( source == desBtn ) then if ( guiGridListGetSelectedItem(pList ) ~= -1 ) then local plr = guiGridListGetItemText(pList ,guiGridListGetSelectedItem(pList),1) local player = getPlayerFromName ( plr ) triggerServerEvent("destroy", localPlayer, plr) destroyElement ( getPedOccupiedVehicle(player) ) end end end ) Link to comment
iMr.WiFi..! Posted April 5, 2016 Share Posted April 5, 2016 ما ظبط addEventHandler("onClientGUIClick",root, function ( ) if ( source == desBtn ) then if ( guiGridListGetSelectedItem(pList ) ~= -1 ) then local plr = guiGridListGetItemText(pList ,guiGridListGetSelectedItem(pList),1) local player = getPlayerFromName ( plr ) triggerServerEvent("destroy", localPlayer, plr) destroyElement ( getPedOccupiedVehicle(player) ) end end end ) addEventHandler("onClientGUIClick",root, function ( ) local sel = guiGridListGetSelectedItem(pList ) local plr = guiGridListGetItemText(pList ,guiGridListGetSelectedItem(pList),1) local player = getPlayerFromName ( plr ) if source == desBtn and sel ~= -1 and isPedInVehicle(plr) then triggerServerEvent("destroy", localPlayer, plr) destroyElement ( getPedOccupiedVehicle(player) ) end end end ) جرب Link to comment
Abdul KariM Posted April 5, 2016 Share Posted April 5, 2016 (edited) # Client addEventHandler("onClientGUIClick",root, function ( ) if ( source == desBtn ) then local Sel = guiGridListGetSelectedItem ( pList ) if Sel and Sel ~= -1 then local aPlayer = guiGridListGetItemText( pList , Sel ,1 ) triggerServerEvent ( "Destroy_Veh", localPlayer , aPlayer ) end end end ) ; # Server addEvent( "Destroy_Veh" , true ) addEventHandler( "Destroy_Veh" ,root, function ( player ) isPlayer = getPlayerFromName ( player ) if not ( isPedInVehicle ( isPlayer ) ) then return outputChatBox("يجب ان يكون الاعب بالسيارة",source,255,255,255,true) end aVeh = getPedOccupiedVehicle ( isPlayer ) if aVeh then destroyElement ( aVeh ) end end ) ; ملاحظة : ماجرب الكود , اعتذر عن الاخطاء لو كان فيه Edited April 5, 2016 by Guest Link to comment
Maksoud Posted April 5, 2016 Author Share Posted April 5, 2016 (edited) ما ظبطوا شوف كنت فى سيارة و احاول اسحبها يقولى يجب ان يكون اللاعب فى سيارة Edited April 5, 2016 by Guest Link to comment
Abdul KariM Posted April 5, 2016 Share Posted April 5, 2016 ما ظبطوا عدلت ردي جرب من ججديد Link to comment
iMr.WiFi..! Posted April 5, 2016 Share Posted April 5, 2016 اطرح الكيلنت كامل + السيرفر 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