SycroX Posted November 8, 2015 Share Posted November 8, 2015 السلام عليكم شو الخطا فلكود انا بحاول اصلح فيه لي ساعة ما عرفت مو عارف وش المشكلة اصلان VIPCar = {} function VIPCARs ( ) if isPedInVehicle ( source ) then exports["guimessages"]:outputServer(source,"#00ff00[VIP System] :#ffff00 Exit your car first ! ",250,128,114,true) cancelEvent () else x,y,z = getElementPosition ( source ) if isElement(VIPCar[source]) then destroyElement(VIPCar[source]) end VIPCar[source] = createVehicle ( 411, x, y, z ) warpPlayerIntoVehicle ( source, VIPCar[source] ) local text = "VIP Car" exports["guimessages"]:outputServer(source,"#00ff00[VIP System] :#ffff00 You Has Got VIP Car !",80,120,200,true) setVehiclePlateText ( VIPCar[source], text ) setVehicleDamageProof ( VIPCar[source], true ) end end addEvent( "VC", true ) addEventHandler( "VC", getRootElement(), VIPCARs ) addEventHandler ( "onVehicleStartEnter", resourceRoot, function ( thePlayer ) if ( source == VIPCar ) then local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if ( isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "VIP1" ) ) ) then outputChatBox ( "Welcome To Your Vehicle ", thePlayer, 255, 255, 0, true ) else cancelEvent ( ) outputChatBox ( "You Must Be In VIP Group ", thePlayer, 255, 255, 0, true ) end end end ) Link to comment
z24d Posted November 8, 2015 Share Posted November 8, 2015 VIPCar = {} function VIPCARs ( ) if isPedInVehicle ( source ) then exports["guimessages"]:outputServer(source,"#00ff00[VIP System] :#ffff00 Exit your car first ! ",250,128,114,true) cancelEvent () else x,y,z = getElementPosition ( source ) if isElement(VIPCar[source]) then destroyElement(VIPCar[source]) end VIPCar[source] = createVehicle ( 411, x, y, z ) warpPlayerIntoVehicle ( source, VIPCar[source] ) local text = "VIP Car" exports["guimessages"]:outputServer(source,"#00ff00[VIP System] :#ffff00 You Has Got VIP Car !",80,120,200,true) setVehiclePlateText ( VIPCar[source], text ) setVehicleDamageProof ( VIPCar[source], true ) end end addEvent( "VC", true ) addEventHandler( "VC", getRootElement(), VIPCARs ) addEventHandler ( "onVehicleStartEnter", getRootElement(), function ( player , seat ) local acc = getPlayerAccount(player) if source == VIPCar[source] then if( isObjectInACLGroup("user."..getAccountName(acc),aclGetGroup("VIP1"))) then outputChatBox ( "Welcome To Your Vehicle ", player, 255, 255, 0 ) else if ( seat == 0 ) then cancelEvent ( ) outputChatBox ( "You Must Be In VIP Group ", player, 255, 0, 0 ) end end end end ) Link to comment
SycroX Posted November 8, 2015 Author Share Posted November 8, 2015 بردو نفس الحكاية انا كنت مجربها ولله :- لسا يدخلني السيارة + للعلم انا شايل الجروب من نفسي Link to comment
Mr.Ronaldo Posted November 8, 2015 Share Posted November 8, 2015 (edited) VIPCar = {} function VIPCARs ( ) if isPedInVehicle ( source ) then exports["guimessages"]:outputServer(source,"#00ff00[VIP System] :#ffff00 Exit your car first ! ",250,128,114,true) cancelEvent () else x,y,z = getElementPosition ( source ) if isElement(VIPCar[source]) then destroyElement(VIPCar[source]) end VIPCar[source] = createVehicle ( 411, x, y, z ) warpPlayerIntoVehicle ( source, VIPCar[source] ) local text = "VIP Car" exports["guimessages"]:outputServer(source,"#00ff00[VIP System] :#ffff00 You Has Got VIP Car !",80,120,200,true) setVehiclePlateText ( VIPCar[source], text ) setVehicleDamageProof ( VIPCar[source], true ) end end addEvent( "VC", true ) addEventHandler( "VC", getRootElement(), VIPCARs ) addEventHandler("onVehicleStartEnter", getResourceRootElement(getThisResource()), function(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if ( isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "VIP1" ) ) ) then outputChatBox ( "Welcome To Your Vehicle ", thePlayer, 255, 255, 0, true ) else cancelEvent() outputChatBox ( "You Must Be In VIP Group ", thePlayer, 255, 255, 0, true ) end end ) الكود مجرب Edited November 8, 2015 by Guest Link to comment
Rockyz Posted November 8, 2015 Share Posted November 8, 2015 addEventHandler ( "onVehicleStartEnter", resourceRoot, function ( thePlayer ) if ( source == VIPCar ) then local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if ( isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "VIP1" ) ) ) then outputChatBox ( "Welcome To Your Vehicle ", thePlayer, 255, 255, 0, true ) else cancelEvent ( ) outputChatBox ( "You Must Be In VIP Group ", thePlayer, 255, 255, 0, true ) end end end ) الكود هذا من هنا ؟ viewtopic.php?f=160&t=94121&p=845670#p845670 المهم جرب ذة VIPCar = { } function VIPCARs ( ) if ( isPedInVehicle ( source ) ) then exports["guimessages"]:outputServer(source,"#00ff00[VIP System] :#ffff00 Exit your car first ! ",250,128,114,true) cancelEvent ( ) end x,y,z = getElementPosition ( source ) if ( isElement ( VIPCar [ source ] ) ) then destroyElement ( VIPCar [ source ] ) end VIPCar [ source ] = createVehicle ( 411, x, y, z ) warpPlayerIntoVehicle ( source, VIPCar [ source ] ) local text = "VIP Car" exports["guimessages"]:outputServer(source,"#00ff00[VIP System] :#ffff00 You Has Got VIP Car !",80,120,200,true) setVehiclePlateText ( VIPCar [ source ], text ) setVehicleDamageProof ( VIPCar [ source ], true ) end addEvent( "VC", true ) addEventHandler( "VC", root, VIPCARs ) addEventHandler ( "onVehicleStartEnter", resourceRoot, function ( thePlayer ) if ( source == VIPCar [ source ] ) then local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if not ( isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "VIP1" ) ) ) then cancelEvent ( ) outputChatBox ( "You Must Be In VIP Group ", thePlayer, 255, 255, 0, true ) else outputChatBox ( "Welcome To Your Vehicle ", thePlayer, 255, 255, 0, true ) end end end ) Link to comment
!#NssoR_) Posted November 8, 2015 Share Posted November 8, 2015 VIPCar = { } function VIPCARs ( ) if ( isPedInVehicle ( source ) ) then exports["guimessages"]:outputServer(source,"#00ff00[VIP System] :#ffff00 Exit your car first ! ",250,128,114,true) cancelEvent ( ) end x,y,z = getElementPosition ( source ) if ( isElement ( VIPCar [ source ] ) ) then destroyElement ( VIPCar [ source ] ) end VIPCar [ source ] = createVehicle ( 411, x, y, z ) warpPlayerIntoVehicle ( source, VIPCar [ source ] ) local text = "VIP Car" exports["guimessages"]:outputServer(source,"#00ff00[VIP System] :#ffff00 You Has Got VIP Car !",80,120,200,true) setVehiclePlateText ( VIPCar [ source ], text ) setVehicleDamageProof ( VIPCar [ source ], true ) end addEvent( "VC", true ) addEventHandler( "VC", getRootElement(), VIPCARs ) addEventHandler ( "onVehicleStartEnter", root, function ( thePlayer ) if ( VIPCar [ thePlayer ] and VIPCar [ thePlayer ] == source ) then if not ( aclGroupListACL(aclGetGroup("VIP1")) ) then outputChatBox ( "القروب موموجود في الاسل !", thePlayer, 255, 255, 0, true ) cancelEvent ( ) end local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if not ( isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "VIP1" ) ) ) then cancelEvent ( ) outputChatBox ( "You Must Be In VIP Group ", thePlayer, 255, 255, 0, true ) else outputChatBox ( "Welcome To Your Vehicle ", thePlayer, 255, 255, 0, true ) end end end) Link to comment
SycroX Posted November 9, 2015 Author Share Posted November 9, 2015 مشكورين نصور + رونلدو كودكم تمام شغال 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