Deep thinker Posted June 15, 2017 Share Posted June 15, 2017 كنت عايز مساعدة في سكريبت سيارة لفريق بس وكل مرة احاول اخرج اللاعب اللي مش من الفريق دة بيخرج كل اللي يدخل السيارة وكنت عايز اعمل "Military" "AttachElements"مع ماركر و الكار دي و فشلت ممكن مساعدة ? addEventHandler ( "onResourceStart", getRootElement(), function() local Banker = createVehicle ( 407, 210.75168, 1872.98572, 18.08962 ) end) addEventHandler ( "onPlayerVehicleEnter", getRootElement(), --This Part should be edited. function() local playerTeam = getPlayerTeam ( source ) if not getPlayerTeam(source) or getPlayerTeam(source) ~= getTeamFromName("Miliray") then return removePedFromVehicle( source ) end end) function Marker() local marker1 = createMarker ( 210.85477, 1869.76001, 20.02477,'arrow',1.5,255,53,53,53 ) attachElements ( Banker, marker1, 0, 0, 1 ) end addEventHandler ( "onResourceStart", getRootElement(), Marker ) شكرا Link to comment
F_F Posted June 15, 2017 Share Posted June 15, 2017 test. addEventHandler ( "onResourceStart", getRootElement(), function() local Banker = createVehicle ( 407, 210.75168, 1872.98572, 18.08962 ) end) addEventHandler ( "onPlayerVehicleEnter", getRootElement(), --This Part should be edited. function() local playerTeam = getPlayerTeam ( source ) if not getPlayerTeam(source) and getPlayerTeam(source) ~= getTeamFromName("Miliray") then return removePedFromVehicle( source ) end end) function Marker() local marker1 = createMarker ( 210.85477, 1869.76001, 20.02477,'arrow',1.5,255,53,53,53 ) attachElements ( Banker, marker1, 0, 0, 1 ) end addEventHandler ( "onResourceStart", getRootElement(), Marker ) Link to comment
Deep thinker Posted June 15, 2017 Author Share Posted June 15, 2017 انا صلحت موضوع الركوب و الماركر اتعملت بس متعملش Attach بيعطيني Warning : (SAUR)BANKER\server.lua:16: Bad Argument @ 'attachElements' [Excpected Element at argument 1,got nil] Link to comment
#Soking Posted June 15, 2017 Share Posted June 15, 2017 29 minutes ago, F_F said: test. addEventHandler ( "onResourceStart", getRootElement(), function() local Banker = createVehicle ( 407, 210.75168, 1872.98572, 18.08962 ) end) addEventHandler ( "onPlayerVehicleEnter", getRootElement(), --This Part should be edited. function() local playerTeam = getPlayerTeam ( source ) if not getPlayerTeam(source) and getPlayerTeam(source) ~= getTeamFromName("Miliray") then return removePedFromVehicle( source ) end end) function Marker() local marker1 = createMarker ( 210.85477, 1869.76001, 20.02477,'arrow',1.5,255,53,53,53 ) attachElements ( Banker, marker1, 0, 0, 1 ) end addEventHandler ( "onResourceStart", getRootElement(), Marker ) ماينفع لوكال على السياره وهو داخل فنكشن كدا ماراح تتحكم فيه من اي فنكشن برا Link to comment
F_F Posted June 15, 2017 Share Posted June 15, 2017 (edited) جرب مرة اخرى @ProMax addEventHandler ( "onResourceStart", getRootElement(), function() Banker = createVehicle ( 407, 210.75168, 1872.98572, 18.08962 ) end) addEventHandler ( "onPlayerVehicleEnter", getRootElement(), --This Part should be edited. function() local playerTeam = getPlayerTeam ( source ) if not getPlayerTeam(source) and getPlayerTeam(source) ~= getTeamFromName("Miliray") then return removePedFromVehicle( source ) end end) function Marker() marker1 = createMarker ( 210.85477, 1869.76001, 20.02477,'arrow',1.5,255,53,53,53 ) attachElements ( Banker, marker1, 0, 0, 1 ) end addEventHandler ( "onResourceStart", getRootElement(), Marker ) Edited June 15, 2017 by F_F Link to comment
Deep thinker Posted June 15, 2017 Author Share Posted June 15, 2017 انا صلحته وكملت ووقفت هنا كنت عايز انقل اللاعب لو هو تيم Military addEventHandler("onMarkerHit",marker1, function () if not getPlayerTeam(source) and getPlayerTeam(source) ~= getTeamFromName("Military") then return outputChatBox("Interior for Military members only",source) end if getPlayerTeam(source) and getPlayerTeam(source) ~= getTeamFromName("Military") then return setElementPosition( source, 193.81210, 1931.61780, 23.24219 ) end if getPlayerTeam(source) and getPlayerTeam(source) ~= getTeamFromName("Military") then return setElementDimension( source, 6000 ) end end) Link to comment
F_F Posted June 15, 2017 Share Posted June 15, 2017 addEventHandler("onMarkerHit",marker1, function () if not getPlayerTeam(source) and getPlayerTeam(source) ~= getTeamFromName("Military") then return outputChatBox("Interior for Military members only",source) if getPlayerTeam(source) and getPlayerTeam(source) == getTeamFromName("Military") then setElementPosition( source, 193.81210, 1931.61780, 23.24219 ) if getPlayerTeam(source) and getPlayerTeam(source) == getTeamFromName("Military") then setElementDimension( source, 6000 ) end end end end) Link to comment
Deep thinker Posted June 15, 2017 Author Share Posted June 15, 2017 Error : loading script Failed : (SAUR)BANKER\server.lua:19: expected (to close 'if' at line 18) near if. Link to comment
F_F Posted June 15, 2017 Share Posted June 15, 2017 (edited) اطرح اسطر ١٩ Edited June 15, 2017 by F_F Link to comment
Deep thinker Posted June 15, 2017 Author Share Posted June 15, 2017 addEventHandler ( "onResourceStart", getRootElement(), function() local Banker = createVehicle ( 407, 210.75168, 1872.98572, 18.08962 ) local marker1 = createMarker ( 210.85477, 1869.76001, 20.02477,'arrow',1,255,53,53,53 ) attachElements ( marker1, Banker, 0, -4, 0.5 ) end) addEventHandler ( "onPlayerVehicleEnter", getRootElement(), --This Part should be edited. function() local playerTeam = getPlayerTeam ( source ) if not getPlayerTeam(source) and getPlayerTeam(source) ~= getTeamFromName("Military") then return removePedFromVehicle( source ) end end) addEventHandler("onMarkerHit",marker1, function () if getPlayerTeam(source) and getPlayerTeam(source) ~= getTeamFromName("Military") then function () setElementInterior( source, 6000 ) setElementPosition( source, 191.89999, 1931.6, 24.3 ) end end end) Link to comment
F_F Posted June 15, 2017 Share Posted June 15, 2017 (edited) addEventHandler ( "onResourceStart", getRootElement(), function() Banker = createVehicle ( 407, 210.75168, 1872.98572, 18.08962 ) marker1 = createMarker ( 210.85477, 1869.76001, 20.02477,'arrow',1,255,53,53,53 ) attachElements ( marker1, Banker, 0, -4, 0.5 ) end) addEventHandler ( "onPlayerVehicleEnter", getRootElement(), --This Part should be edited. function() local playerTeam = getPlayerTeam ( source ) if not getPlayerTeam(source) and getPlayerTeam(source) ~= getTeamFromName("Military") then return removePedFromVehicle( source ) end end) addEventHandler("onMarkerHit",marker1, function () if getPlayerTeam(source) and getPlayerTeam(source) == getTeamFromName("Military") then setElementInterior( source, 6000 ) setElementPosition( source, 191.89999, 1931.6, 24.3 ) end end) جرب Edited June 15, 2017 by F_F Link to comment
F_F Posted June 15, 2017 Share Posted June 15, 2017 (edited) جرب addEventHandler ( "onResourceStart", getRootElement(), function() Banker = createVehicle ( 407, 210.75168, 1872.98572, 18.08962 ) marker1 = createMarker ( 210.85477, 1869.76001, 20.02477,'arrow',1,255,53,53,53 ) attachElements ( marker1, Banker, 0, -4, 0.5 ) end) addEventHandler ( "onPlayerVehicleEnter", getRootElement(), --This Part should be edited. function() local playerTeam = getPlayerTeam ( source ) if not getPlayerTeam(source) and getPlayerTeam(source) ~= getTeamFromName("Military") then return removePedFromVehicle( source ) end end) function aT(ahit) if getPlayerTeam(ahit) and getPlayerTeam(ahit) == getTeamFromName("Military") then setElementInterior( source, 6000 ) setElementPosition( source, 191.89999, 1931.6, 24.3 ) end end) addEventHandler("onMarkerHit",marker1) او addEventHandler ( "onResourceStart", getRootElement(), function() Banker = createVehicle ( 407, 210.75168, 1872.98572, 18.08962 ) marker1 = createMarker ( 210.85477, 1869.76001, 20.02477,'arrow',1,255,53,53,53 ) attachElements ( marker1, Banker, 0, -4, 0.5 ) end) addEventHandler ( "onPlayerVehicleEnter", getRootElement(), --This Part should be edited. function() local playerTeam = getPlayerTeam ( source ) if not getPlayerTeam(source) and getPlayerTeam(source) ~= getTeamFromName("Military") then return removePedFromVehicle( source ) end end) function aT(ahit) if getPlayerTeam(ahit) and getPlayerTeam(ahit) == getTeamFromName("Military") then setElementInterior( ahit, 6000 ) setElementPosition( ahit, 191.89999, 1931.6, 24.3 ) end end) addEventHandler("onMarkerHit",marker1) Edited June 15, 2017 by F_F Link to comment
Deep thinker Posted June 15, 2017 Author Share Posted June 15, 2017 انا قريت الويكي ووجدت انو مينفعش نعمل setPlayerDimension او setPlayerPosition والماركر معمولها AttachElements addEventHandler ( "onResourceStart", getRootElement(), function() local Banker = createVehicle ( 407, 210.75168, 1872.98572, 18.08962 ) local pickup1 = createPickup ( 210.85477, 1869.76001, 20.02477, 3, 1318 ) attachElements ( pickup1, Banker, 0, -4, 0.5 ) end) addEventHandler ( "onPlayerVehicleEnter", getRootElement(), --This Part should be edited. function() local playerTeam = getPlayerTeam ( source ) if not getPlayerTeam(source) and getPlayerTeam(source) ~= getTeamFromName("Military") then return removePedFromVehicle( source ) end end) addEventHandler("onPickupUse", pickup1, function () if getPlayerTeam(source) and getPlayerTeam(source) ~= getTeamFromName("Military") then setElementDimension( source, 6000 ) setElementPosition( source, 191.89999, 1931.6, 24.3 ) end end) خليته بل Pickups مش شغال بردو 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