Tarek1 Posted October 11, 2016 Share Posted October 11, 2016 السلام عليكم يتم اعطاءه سيارهAcceptويضغط علي Marker1فكره السكربت هو عندما يذهب الاعب الي يتم اختفاء السياره ويحصل علي$ 7000marker2وعندما يصل الي لا تختفي السياره ولا يتم اعطاء الاعب 7000$:مشاكل السكربت فقطCriminalطلب بسيط اخر ممكن كود اضافه المود الي تيم --Client marker1 = createMarker(1614.43103, -1506.77539, 13.21113,"cylinder",2,220, 20, 60) marker2 = createMarker(1022.42944, 2376.18359, 9.82031,"cylinder",4,255,0,0) addEventHandler ( "onClientResourceStart" , resourceRoot , function ( ) window = guiCreateWindow(282, 129, 708, 425, "Drug Delivary", false) guiWindowSetSizable(window, false) memo = guiCreateMemo(24, 42, 674, 103, "Welcome to Drug Delivary, after you press accept the server will move you into a car you must go with it into the marker you can find this marrker into the truck blip in the map :)) if you found any bug Contact staff team or report\nit @theForum [ 7000$ ]", false, window) accept = guiCreateButton(25, 331, 95, 84, "Accept", false, window) Close = guiCreateButton(597, 327, 95, 84, "Close", false, window) --guiWindowSetSizable(window, false) guiSetVisible ( window , false ) end ); addEventHandler ( "onClientMarkerHit" , root , function ( player ) if ( source == marker1 and player == localPlayer and not isPedInVehicle ( player ) ) then guiSetVisible ( window , true ) guiWindowSetSizable(window, true) showCursor ( true ) guiSetInputEnabled ( true ) end end ); addEventHandler ( "onClientGUIClick" , root , function ( ) if ( source == accept ) then guiSetVisible ( window , false ) showCursor ( false ) guiSetInputEnabled ( false ) triggerServerEvent ( "CreateVehicle_" , localPlayer ) elseif ( source == Close ) then guiSetVisible ( window , false ) showCursor ( false ) guiSetInputEnabled ( false ) end end ); addEvent("GiveWe",true) addEventHandler("GiveWe",marker2,function() DestroyElmenet(table [ source ]) givePlayerMoney(7000) end) --Server local table = { } addEvent ( "CreateVehicle_" , true ) addEventHandler ( "CreateVehicle_" , getRootElement ( ) , function ( ) if isElement ( table [ source ] ) then destroyElement ( table [ source ] ) end local x , y , z = getElementPosition ( source ) table [ source ] = createVehicle ( 482, 1605.30298, -1464.82532, 13.56153 +1 ) warpPedIntoVehicle(source, table [ source ]) triggerClientEvent("GiveWe",playerSource) end ) ; Link to comment
iPrestege Posted October 11, 2016 Share Posted October 11, 2016 جرب هذا ماجربتة من الجوال حالياً كلنت : local marker1 = createMarker ( 1614.43103,-1506.77539,13.21113,"cylinder",2,220,20,60 ) window = guiCreateWindow(282, 129, 708, 425, "Drug Delivary", false) guiWindowSetSizable(window, false) memo = guiCreateMemo(24, 42, 674, 103, "Welcome to Drug Delivary, after you press accept the server will move you into a car you must go with it into the marker you can find this marrker into the truck blip in the map :)) if you found any bug Contact staff team or report\nit @theForum [ 7000$ ]", false, window) accept = guiCreateButton(25, 331, 95, 84, "Accept", false, window) Close = guiCreateButton(597, 327, 95, 84, "Close", false, window) guiSetVisible ( window , false ) addEventHandler ( "onClientMarkerHit" ,marker1, function ( player ) if ( player == localPlayer and not isPedInVehicle ( player ) ) then local team = getTeamFromName ( 'Criminal' ) local pteam = getPlayerTeam ( player ) if ( pteam ~= team ) then return false end guiSetVisible ( window , true ) guiWindowSetSizable(window, true) showCursor ( true ) guiSetInputEnabled ( true ) end end ) addEventHandler ( "onClientGUIClick" ,root, function ( ) if ( source == accept ) then guiSetVisible ( window , false ) showCursor ( false ) guiSetInputEnabled ( false ) triggerServerEvent ( "CreateVehicle_" , localPlayer ) elseif ( source == Close ) then guiSetVisible ( window , false ) showCursor ( false ) guiSetInputEnabled ( false ) end end ) سيرفر : local table = { } local marker2 = createMarker ( 1022.42944,2376.18359,9.82031,"cylinder",4,255,0,0 ) addEvent ( 'CreateVehicle_',true ) addEventHandler ( 'CreateVehicle_',getRootElement ( ), function ( ) if isElement ( table [ source ] ) then destroyElement ( table [ source ] ) table [ source ] = nil end table [ source ] = createVehicle ( 482, 1605.30298, -1464.82532, 13.56153 +1 ) warpPedIntoVehicle ( source, table [ source ] ) end ) addEventHandler ( 'onMarkerHit',marker2, function ( player ) if ( player and getElementType ( player ) == 'player' ) then local vehicle = getPedOccupiedVehicle( player ) if ( vehicle and vehicle == table [ source ] ) then if isElement ( table [ source ] ) then destroyElement ( table [ source ] ) givePlayerMoney( player,7000 ) end end end end ) addEventHandler ( 'onPlayerQuit',root, function ( ) if isElement ( table [ source ] ) then destroyElement ( table [ source ] ) table [ source ] = nil end end ) عشان تفتح لوحة الماركر لازم تكون في تيم Criminal Link to comment
Tarek1 Posted October 11, 2016 Author Share Posted October 11, 2016 46 minutes ago, FaHaD said: جرب هذا ماجربتة من الجوال حالياً كلنت : local marker1 = createMarker ( 1614.43103,-1506.77539,13.21113,"cylinder",2,220,20,60 ) window = guiCreateWindow(282, 129, 708, 425, "Drug Delivary", false) guiWindowSetSizable(window, false) memo = guiCreateMemo(24, 42, 674, 103, "Welcome to Drug Delivary, after you press accept the server will move you into a car you must go with it into the marker you can find this marrker into the truck blip in the map :)) if you found any bug Contact staff team or report\nit @theForum [ 7000$ ]", false, window) accept = guiCreateButton(25, 331, 95, 84, "Accept", false, window) Close = guiCreateButton(597, 327, 95, 84, "Close", false, window) guiSetVisible ( window , false ) addEventHandler ( "onClientMarkerHit" ,marker1, function ( player ) if ( player == localPlayer and not isPedInVehicle ( player ) ) then local team = getTeamFromName ( 'Criminal' ) local pteam = getPlayerTeam ( player ) if ( pteam ~= team ) then return false end guiSetVisible ( window , true ) guiWindowSetSizable(window, true) showCursor ( true ) guiSetInputEnabled ( true ) end end ) addEventHandler ( "onClientGUIClick" ,root, function ( ) if ( source == accept ) then guiSetVisible ( window , false ) showCursor ( false ) guiSetInputEnabled ( false ) triggerServerEvent ( "CreateVehicle_" , localPlayer ) elseif ( source == Close ) then guiSetVisible ( window , false ) showCursor ( false ) guiSetInputEnabled ( false ) end end ) سيرفر : local table = { } local marker2 = createMarker ( 1022.42944,2376.18359,9.82031,"cylinder",4,255,0,0 ) addEvent ( 'CreateVehicle_',true ) addEventHandler ( 'CreateVehicle_',getRootElement ( ), function ( ) if isElement ( table [ source ] ) then destroyElement ( table [ source ] ) table [ source ] = nil end table [ source ] = createVehicle ( 482, 1605.30298, -1464.82532, 13.56153 +1 ) warpPedIntoVehicle ( source, table [ source ] ) end ) addEventHandler ( 'onMarkerHit',marker2, function ( player ) if ( player and getElementType ( player ) == 'player' ) then local vehicle = getPedOccupiedVehicle( player ) if ( vehicle and vehicle == table [ source ] ) then if isElement ( table [ source ] ) then destroyElement ( table [ source ] ) givePlayerMoney( player,7000 ) end end end end ) addEventHandler ( 'onPlayerQuit',root, function ( ) if isElement ( table [ source ] ) then destroyElement ( table [ source ] ) table [ source ] = nil end end ) عشان تفتح لوحة الماركر لازم تكون في تيم Criminal لكن عندما يصل الاعب الي الهدف المطلوب لا تختفي السياره و لا يتم اعطاءه مال Criminal Teamهيا شغاله لل Link to comment
iPrestege Posted October 11, 2016 Share Posted October 11, 2016 وش يعطيك الـ debugscript 3 Link to comment
Tarek1 Posted October 11, 2016 Author Share Posted October 11, 2016 1 minute ago, FaHaD said: وش يعطيك الـ debugscript 3 مفيش اي مشكله Link to comment
iPrestege Posted October 11, 2016 Share Posted October 11, 2016 addEventHandler ( 'onMarkerHit',marker2, function ( player ) if ( player and getElementType ( player ) == 'player' ) then local vehicle = getPedOccupiedVehicle( player ) if ( vehicle and vehicle == table [ source ] ) then if isElement ( table [ source ] ) then destroyElement ( table [ source ] ) givePlayerMoney( player,7000 ) end end end end ) بدل هذا بـ addEventHandler ( 'onMarkerHit',marker2, function ( player ) if ( player and getElementType ( player ) == 'player' and isPedInVehicle ( player ) ) then local vehicle = getPedOccupiedVehicle( player ) if ( vehicle and vehicle == table [ player ] ) then if isElement ( table [ player ] ) then destroyElement ( table [ player ] ) givePlayerMoney( player,7000 ) end end end end ) 1 Link to comment
Walid Posted October 11, 2016 Share Posted October 11, 2016 Client side addEventHandler ( 'onClientResourceStart',resourceRoot, function () window = guiCreateWindow(282, 129, 708, 425, "Drug Delivary", false) guiWindowSetSizable(window, false) memo = guiCreateMemo(24, 42, 674, 103, "Welcome to Drug Delivary, after you press accept the server will move you into a car you must go with it into the marker you can find this marrker into the truck blip in the map :)) if you found any bug Contact staff team or report\nit @theForum [ 7000$ ]", false, window) accept = guiCreateButton(25, 331, 95, 84, "Accept", false, window) Close = guiCreateButton(597, 327, 95, 84, "Close", false, window) guiSetVisible ( window , false ) end ) addEvent("openGui",true) addEventHandler ("openGui" ,root, function () guiSetVisible ( window , true ) guiWindowSetSizable(window, true) showCursor ( true ) guiSetInputEnabled ( true ) end ) addEventHandler ( "onClientGUIClick" ,root, function ( ) if ( source == accept ) then guiSetVisible ( window , false ) showCursor ( false ) guiSetInputEnabled ( false ) triggerServerEvent ( "CreateVehicle_" , localPlayer ) elseif ( source == Close ) then guiSetVisible ( window , false ) showCursor ( false ) guiSetInputEnabled ( false ) end end ) Sever side local theTable = { } local marker1 = createMarker ( 1614.43103,-1506.77539,13.21113,"cylinder",2,220,20,60 ) local marker2 = createMarker ( 1022.42944,2376.18359,9.82031,"cylinder",4,255,0,0 ) addEvent ('CreateVehicle_',true ) addEventHandler ('CreateVehicle_',root, function () if isElement (theTable [source]) then destroyElement (theTable [source]) theTable [ source ] = nil end theTable [source] = createVehicle ( 482, 1605.30298, -1464.82532, 13.6) warpPedIntoVehicle (source, theTable [source]) end ) addEventHandler ( 'onMarkerHit',marker1, function (player) if (player and getElementType (player) == "player" and not isPedInVehicle(player)) then local pteam = getPlayerTeam ( player ) if pteam then local teamName = getTeamName (pteam) if teamName == "Criminal" then triggerClientEvent(player,"openGui",player) end end end end ) addEventHandler ( 'onMarkerHit',marker2, function (vehicle) if (vehicle and getElementType (vehicle) == "vehicle") then local thePlayer = getVehicleController (vehicle) if isElement(theTable [thePlayer]) then if (vehicle == theTable [thePlayer]) then destroyElement (theTable[thePlayer]) givePlayerMoney(thePlayer,7000) end end end end ) addEventHandler ( 'onPlayerQuit',root, function () if isElement (theTable [source]) then destroyElement (theTable [source]) theTable [source] = nil end end ) 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