Scorpio Posted May 4, 2013 Share Posted May 4, 2013 ابي اغير الكود ذا بدل ما يستعمل الماركر + السيارة الأدمن الى جروب سيستم الأكواد الي عندي --[[ * Script : Admins Cars Marker | v1.0 * Type : server ============ * Author : #Pai_[N] --]] -------------------------------- if ( getElementData( player , "Group" ) == "KOL" ) then -------------------------------- players = getElementsByType ( 'player' ) function getAllowed ( ) for _,v in ipairs( acc ) do return v end end addEventHandler ( 'onResourceStart', resourceRoot, function ( ) for k,v in ipairs( players ) do local acc = getPlayerAccount ( v ) if isGuestAccount ( CC ) then return end local accName = getAccountName ( acc ) if ( getElementData( player , "Group" ) == "KOL" ) then end end end ) addEventHandler ( 'onPlayerLogin', root, function ( _, acc ) if isGuestAccount ( acc ) then return end local accName = getAccountName ( acc ) if ( getElementData( player , "Group" ) == "KOL" ) then end end ) addEventHandler ( 'onPlayerLogout', root, function ( ) if ( getElementData( player , "Group" ) == "KOL" ) then end ) addEvent ( 'onVehicleCreate', true ) addEventHandler ( 'onVehicleCreate', root, function ( id ) local x, y, z = getElementPosition ( source ) for k,v in ipairs( getElementsByType ( 'vehicle' ) ) do if getElementData ( v, 'fromMarker' ) then if getPlayerSerial ( source ) == getElementData ( v, 'owner' ) then destroyElement ( v ) end end end car = createVehicle ( id, x, y, z ) warpPedIntoVehicle ( source, car ) setVehicleDamageProof ( car, true ) setElementData ( car, 'fromMarker', true ) setElementData ( car, 'owner', getPlayerSerial ( source ) ) end ) addEventHandler ( 'onPlayerQuit', root, function ( ) local veh = getPedOccupiedVehicle ( source ) if veh then destroyElement ( veh ) end for k,v in ipairs( getElementsByType ( 'vehicle' ) ) do if getElementData ( v, 'fromMarker' ) then if getPlayerSerial ( source ) == getElementData ( v, 'owner' ) then destroyElement ( v ) end end end end ) addEventHandler ( 'onVehicleStartEnter', root, function ( player, seat ) if getElementData ( source, 'fromMarker' ) then if seat == 0 then local acc = getPlayerAccount ( player ) if isGuestAccount ( acc ) then cancelEvent ( ) return outputChatBox ( 'ممتلكات خاصة بجروب كول', player ) end local accName = getAccountName ( acc ) if not isObjectInACLGroup ( 'user.'..accName, aclGetGroup ( getAllowed ( ) ) ) then cancelEvent ( ) return outputChatBox ( 'ممتلكات خاصة بجروب كول', player ) end end end end ) ---وهذي الأكواد الأصلية--- --[[ * Script : Admins Cars Marker | v1.0 * Type : server ============ * Author : #Pai_[N] --]] -------------------------------- Groups = { 'Admin', 'Console' } -------------------------------- players = getElementsByType ( 'player' ) function getAllowed ( ) for _,v in ipairs( Groups ) do return v end end addEventHandler ( 'onResourceStart', resourceRoot, function ( ) for k,v in ipairs( players ) do local acc = getPlayerAccount ( v ) if isGuestAccount ( acc ) then return end local accName = getAccountName ( acc ) if isObjectInACLGroup ( 'user.'..accName, aclGetGroup ( getAllowed ( ) ) ) then setElementData ( v, 'Admin', true ) end end end ) addEventHandler ( 'onPlayerLogin', root, function ( _, acc ) if isGuestAccount ( acc ) then return end local accName = getAccountName ( acc ) if isObjectInACLGroup ( 'user.'..accName, aclGetGroup ( getAllowed ( ) ) ) then setElementData ( source, 'Admin', true ) end end ) addEventHandler ( 'onPlayerLogout', root, function ( ) setElementData ( source, 'Admin', false ) end ) addEvent ( 'onVehicleCreate', true ) addEventHandler ( 'onVehicleCreate', root, function ( id ) local x, y, z = getElementPosition ( source ) for k,v in ipairs( getElementsByType ( 'vehicle' ) ) do if getElementData ( v, 'fromMarker' ) then if getPlayerSerial ( source ) == getElementData ( v, 'owner' ) then destroyElement ( v ) end end end car = createVehicle ( id, x, y, z ) warpPedIntoVehicle ( source, car ) setVehicleDamageProof ( car, true ) setElementData ( car, 'fromMarker', true ) setElementData ( car, 'owner', getPlayerSerial ( source ) ) end ) addEventHandler ( 'onPlayerQuit', root, function ( ) local veh = getPedOccupiedVehicle ( source ) if veh then destroyElement ( veh ) end for k,v in ipairs( getElementsByType ( 'vehicle' ) ) do if getElementData ( v, 'fromMarker' ) then if getPlayerSerial ( source ) == getElementData ( v, 'owner' ) then destroyElement ( v ) end end end end ) addEventHandler ( 'onVehicleStartEnter', root, function ( player, seat ) if getElementData ( source, 'fromMarker' ) then if seat == 0 then local acc = getPlayerAccount ( player ) if isGuestAccount ( acc ) then cancelEvent ( ) return outputChatBox ( '! للأدمن فقط', player ) end local accName = getAccountName ( acc ) if not isObjectInACLGroup ( 'user.'..accName, aclGetGroup ( getAllowed ( ) ) ) then cancelEvent ( ) return outputChatBox ( '! للأدمن فقط', player ) end end end end ) انا ابي اغيرها للجروب وهذا كود الأخ برستجي if ( getElementData( player , "Group" ) == "KOL" ) then وشكراً لكل الي راح يساهم في مساعدتي Link to comment
3NAD Posted May 4, 2013 Share Posted May 4, 2013 ممكن تعلمني هذا الكود وش يسوي ؟ if ( getElementData( player , "Group" ) == "KOL" ) then Link to comment
Scorpio Posted May 4, 2013 Author Share Posted May 4, 2013 ممكن تعلمني هذا الكود وش يسوي ؟ if ( getElementData( player , "Group" ) == "KOL" ) then ذا كود يستخدم لفتح الباب والممتلكات خاصة لمود الجروب سيستم من انشاء برستجي Link to comment
PaiN^ Posted May 4, 2013 Share Posted May 4, 2013 مكانه غلط + end تحتاج if كل + قلي وش بتسوي اسويه لك Link to comment
Scorpio Posted May 4, 2013 Author Share Posted May 4, 2013 مكانه غلط + end تحتاج if كل + قلي وش بتسوي اسويه لك ابي اخلي المارك محد يستخدمو غير الي منضم في جروب كول + السيارة انا غيرتو الي الكود الي سواه برستجي الي هو if ( getElementData( player , "Group" ) == "KOL" ) then وهذى استخدام لمود Group system الي سواه العقرب Link to comment
PaiN^ Posted May 4, 2013 Share Posted May 4, 2013 جرب --[[ * Script : Admins Cars Marker | v1.0 * Type : server ============ * Author : #Pai_[N] --]] -------------------------------- -------------------------------- players = getElementsByType ( 'player' ) addEventHandler ( 'onResourceStart', resourceRoot, function ( ) for k,v in ipairs( players ) do if getElementData ( v, 'Gang' ) == 'KOL' then setElementData ( v, 'Admin', true ) end end end ) addEvent ( 'onVehicleCreate', true ) addEventHandler ( 'onVehicleCreate', root, function ( id ) local x, y, z = getElementPosition ( source ) for k,v in ipairs( getElementsByType ( 'vehicle' ) ) do if getElementData ( v, 'fromMarker' ) then if getPlayerSerial ( source ) == getElementData ( v, 'owner' ) then destroyElement ( v ) end end end car = createVehicle ( id, x, y, z ) warpPedIntoVehicle ( source, car ) setVehicleDamageProof ( car, true ) setElementData ( car, 'fromMarker', true ) setElementData ( car, 'owner', getPlayerSerial ( source ) ) end ) addEventHandler ( 'onPlayerQuit', root, function ( ) local veh = getPedOccupiedVehicle ( source ) if veh then destroyElement ( veh ) end for k,v in ipairs( getElementsByType ( 'vehicle' ) ) do if getElementData ( v, 'fromMarker' ) then if getPlayerSerial ( source ) == getElementData ( v, 'owner' ) then destroyElement ( v ) end end end end ) addEventHandler ( 'onVehicleStartEnter', root, function ( player, seat ) if getElementData ( source, 'fromMarker' ) then if seat == 0 then if not getElementData ( player, 'Gang' ) == 'KOL' then outputChatBox ( '! للأدمن فقط', player ) end end end end ) Link to comment
Scorpio Posted May 4, 2013 Author Share Posted May 4, 2013 جرب --[[ * Script : Admins Cars Marker | v1.0 * Type : server ============ * Author : #Pai_[N] --]] -------------------------------- -------------------------------- players = getElementsByType ( 'player' ) addEventHandler ( 'onResourceStart', resourceRoot, function ( ) for k,v in ipairs( players ) do if getElementData ( v, 'Gang' ) == 'KOL' then setElementData ( v, 'Admin', true ) end end end ) addEvent ( 'onVehicleCreate', true ) addEventHandler ( 'onVehicleCreate', root, function ( id ) local x, y, z = getElementPosition ( source ) for k,v in ipairs( getElementsByType ( 'vehicle' ) ) do if getElementData ( v, 'fromMarker' ) then if getPlayerSerial ( source ) == getElementData ( v, 'owner' ) then destroyElement ( v ) end end end car = createVehicle ( id, x, y, z ) warpPedIntoVehicle ( source, car ) setVehicleDamageProof ( car, true ) setElementData ( car, 'fromMarker', true ) setElementData ( car, 'owner', getPlayerSerial ( source ) ) end ) addEventHandler ( 'onPlayerQuit', root, function ( ) local veh = getPedOccupiedVehicle ( source ) if veh then destroyElement ( veh ) end for k,v in ipairs( getElementsByType ( 'vehicle' ) ) do if getElementData ( v, 'fromMarker' ) then if getPlayerSerial ( source ) == getElementData ( v, 'owner' ) then destroyElement ( v ) end end end end ) addEventHandler ( 'onVehicleStartEnter', root, function ( player, seat ) if getElementData ( source, 'fromMarker' ) then if seat == 0 then if not getElementData ( player, 'Gang' ) == 'KOL' then outputChatBox ( '! للأدمن فقط', player ) end end end end ) ما ظبت Link to comment
PaiN^ Posted May 4, 2013 Share Posted May 4, 2013 همم جرب ذا : --[[ * Script : Admins Cars Marker | v1.0 * Type : server ============ * Author : #Pai_[N] --]] -------------------------------- -------------------------------- players = getElementsByType ( 'player' ) addEventHandler ( 'onResourceStart', resourceRoot, function ( ) for k,v in ipairs( players ) do if getElementData ( v, 'Gang' ) == 'KOL' then setElementData ( v, 'Admin', true ) end end end ) addEvent ( 'onVehicleCreate', true ) addEventHandler ( 'onVehicleCreate', root, function ( id ) local x, y, z = getElementPosition ( source ) for k,v in ipairs( getElementsByType ( 'vehicle' ) ) do if getElementData ( v, 'fromMarker' ) then if getPlayerSerial ( source ) == getElementData ( v, 'owner' ) then destroyElement ( v ) end end end car = createVehicle ( id, x, y, z ) warpPedIntoVehicle ( source, car ) setVehicleDamageProof ( car, true ) setElementData ( car, 'fromMarker', true ) setElementData ( car, 'owner', getPlayerSerial ( source ) ) end ) addEventHandler ( 'onPlayerQuit', root, function ( ) local veh = getPedOccupiedVehicle ( source ) if veh then destroyElement ( veh ) end for k,v in ipairs( getElementsByType ( 'vehicle' ) ) do if getElementData ( v, 'fromMarker' ) then if getPlayerSerial ( source ) == getElementData ( v, 'owner' ) then destroyElement ( v ) end end end end ) addEventHandler ( 'onVehicleStartEnter', root, function ( player, seat ) if getElementData ( source, 'fromMarker' ) then if seat == 0 then if not getElementData ( player, 'Admin' ) then outputChatBox ( '! للأدمن فقط', player ) end end end end ) ! إن شاء الله يزبط Link to comment
iMr.Dawix~# Posted May 4, 2013 Share Posted May 4, 2013 هممجرب ذا : --[[ * Script : Admins Cars Marker | v1.0 * Type : server ============ * Author : #Pai_[N] --]] -------------------------------- -------------------------------- players = getElementsByType ( 'player' ) addEventHandler ( 'onResourceStart', resourceRoot, function ( ) for k,v in ipairs( players ) do if getElementData ( v, 'Gang' ) == 'KOL' then setElementData ( v, 'Admin', true ) end end end ) addEvent ( 'onVehicleCreate', true ) addEventHandler ( 'onVehicleCreate', root, function ( id ) local x, y, z = getElementPosition ( source ) for k,v in ipairs( getElementsByType ( 'vehicle' ) ) do if getElementData ( v, 'fromMarker' ) then if getPlayerSerial ( source ) == getElementData ( v, 'owner' ) then destroyElement ( v ) end end end car = createVehicle ( id, x, y, z ) warpPedIntoVehicle ( source, car ) setVehicleDamageProof ( car, true ) setElementData ( car, 'fromMarker', true ) setElementData ( car, 'owner', getPlayerSerial ( source ) ) end ) addEventHandler ( 'onPlayerQuit', root, function ( ) local veh = getPedOccupiedVehicle ( source ) if veh then destroyElement ( veh ) end for k,v in ipairs( getElementsByType ( 'vehicle' ) ) do if getElementData ( v, 'fromMarker' ) then if getPlayerSerial ( source ) == getElementData ( v, 'owner' ) then destroyElement ( v ) end end end end ) addEventHandler ( 'onVehicleStartEnter', root, function ( player, seat ) if getElementData ( source, 'fromMarker' ) then if seat == 0 then if not getElementData ( player, 'Admin' ) then outputChatBox ( '! للأدمن فقط', player ) end end end end ) ! إن شاء الله يزبط cancelEvent() يمكن تحتاج Link to comment
PaiN^ Posted May 5, 2013 Share Posted May 5, 2013 لوووول معك حق ذذ مشكور ضاوي @ Scorpio : حط هذا الكود بعد سطر 61 : cancelEvent ( ) Link to comment
Scorpio Posted May 6, 2013 Author Share Posted May 6, 2013 لوووول معك حق ذذمشكور ضاوي @ Scorpio : حط هذا الكود بعد سطر 61 : cancelEvent ( ) مشكور يابان + اسف على تأخر ردي على شان ما كنت موجود الأيام ذي (((اختبارات))) مشكور لكل الي ساعدو 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