Narutimmy Posted January 10, 2013 Posted January 10, 2013 Hola esque ocupo ayuda jeje aye un scrip de antizombis en una are, pero quiero que sea 100% me refiero a que no se pueda matar a otros users en ella Server local aSavePlaces = { Rectangle = { -- X, Y, Width, Height { -3000, 2122, 800, 800 }; }; } local aRadarAreaPlaces = { -- x, y ,size 1, size 2, color: red, green, blue, alpha. { -3000, 2122, 800, 800, 0, 255, 0, 100 }; { 2773, -2430, 30, 30, 0, 255, 0, 255 }; } local sResourceName = getResourceName ( resource ) local bUseGunsInSavePlace = get( sResourceName .. '.UseGunsInSaveZone' ) local bUseRadarArea = get( sResourceName .. '.UseRadarArea' ) local pColshape, pRadarArea local bUseRunInSaveZone = get( sResourceName .. '.UseRunInSaveZone' ) local bUseJumpInSaveZone = get( sResourceName .. '.UseJumpInSaveZone' ) local bUseWeaponHudInSaveZone = get( sResourceName .. '.UseWeaponHudInSaveZone' ) local bUseAmmoHudInSaveZone = get( sResourceName .. '.UseAmmoHudInSaveZone' ) local bUseDamageInSaveZone = get( sResourceName .. '.UseDamageInSaveZone' ) addEventHandler ( 'onResourceStart', resourceRoot, function ( ) for s, _ in pairs( aSavePlaces ) do for _, a in pairs( aSavePlaces[ s ] ) do pColshape = _G[ 'createCol' .. s ]( unpack( a ) ) setElementData( pColshape, 'zombieProof', true ) addEventHandler ( 'onColShapeHit', pColshape, function ( pHitElement ) if getElementType( pHitElement ) == 'player' then if not bUseGunsInSavePlace then toggleControl ( pHitElement, 'fire', false ) toggleControl ( pHitElement, 'aim_weapon', false ) toggleControl ( pHitElement, 'vehicle_fire', false ) end if not bUseRunInSaveZone then toggleControl ( pHitElement, 'sprint', false ) end if not bUseJumpInSaveZone then toggleControl ( pHitElement, 'jump', false ) end if not bUseWeaponHudInSaveZone then showPlayerHudComponent ( pHitElement, 'weapon', false ) end if not bUseAmmoHudInSaveZone then showPlayerHudComponent ( pHitElement, 'ammo', false ) end if not bUseDamageInSaveZone then setElementData( pHitElement, 'damage', 'no' ) end elseif getElementType( pHitElement ) == 'ped' then -- check if the entered ped kill it killPed( pHitElement ) -- kill ped end end ) addEventHandler ( 'onColShapeLeave', pColshape, function ( pLeaveElement ) if getElementType( pLeaveElement ) == 'player' then if not bUseGunsInSavePlace then toggleControl ( pLeaveElement, 'fire', true ) toggleControl ( pLeaveElement, 'aim_weapon', true ) toggleControl ( pLeaveElement, 'vehicle_fire', true ) end if not bUseRunInSaveZone then toggleControl ( pLeaveElement, 'sprint', true ) end if not bUseJumpInSaveZone then toggleControl ( pLeaveElement, 'jump', true ) end if not bUseWeaponHudInSaveZone then showPlayerHudComponent ( pLeaveElement, 'weapon', true ) end if not bUseAmmoHudInSaveZone then showPlayerHudComponent ( pLeaveElement, 'ammo', true ) end if not bUseDamageInSaveZone then setElementData( pLeaveElement, 'damage', 'yes' ) end elseif getElementType( pLeaveElement ) == 'ped' then -- check if the entered ped kill it killPed( pLeaveElement ) -- kill ped end end ) end end if bUseRadarArea then for _, a in ipairs( aRadarAreaPlaces ) do pRadarArea = createRadarArea ( unpack( a ) ) end end end ) Client addEventHandler( 'onClientPlayerDamage', localPlayer, function( ) if getElementData( localPlayer, 'damage' ) == 'no' then cancelEvent( ) end end )
FraN-724 Posted January 10, 2013 Posted January 10, 2013 Te refieres a que sea una zona con godmode ?
Narutimmy Posted January 10, 2013 Author Posted January 10, 2013 Te refieres a que sea una zona con godmode ? quese desactiven las armas
FraN-724 Posted January 10, 2013 Posted January 10, 2013 No estoy muy seguro si esta function te puede servir toggleControl
Arsilex Posted January 10, 2013 Posted January 10, 2013 es mejor quitarle al player las armas y volver a darselas al salir de la zona creo yo
FraN-724 Posted January 10, 2013 Posted January 10, 2013 es mejor quitarle al player las armas y volver a darselas al salir de la zona creo yo También es una buena idea esa
Narutimmy Posted January 10, 2013 Author Posted January 10, 2013 es mejor quitarle al player las armas y volver a darselas al salir de la zona creo yo También es una buena idea esa Si supiera hacer eso
Arsilex Posted January 10, 2013 Posted January 10, 2013 es muy fácil solo tienes que guardar las armas del personaje en su cuenta quitárselas y cuando salga dárselas sacándolas de su cuenta
BorderLine Posted January 10, 2013 Posted January 10, 2013 Crea el godmode por clientSide dandole un trigger, y desde serverside entrando a la zona ke se aplike el trigger del cliente de godmode y otro trigger del cliente para ke se no tenga mas godmode al salir de la zona
Narutimmy Posted March 28, 2013 Author Posted March 28, 2013 Te refieres a que sea una zona con godmode ? El problema es que pueden matar con cuchillo
Castillo Posted March 28, 2013 Posted March 28, 2013 Cancela este evento: https://wiki.multitheftauto.com/wiki/On ... tealthKill
Narutimmy Posted March 28, 2013 Author Posted March 28, 2013 Cancela este evento: https://wiki.multitheftauto.com/wiki/On ... tealthKill como lo uso para que solo sea cuando esten en el area?
Alexs Posted March 29, 2013 Posted March 29, 2013 Cancela este evento: https://wiki.multitheftauto.com/wiki/On ... tealthKill como lo uso para que solo sea cuando esten en el area? isInsideRadarArea
Narutimmy Posted March 30, 2013 Author Posted March 30, 2013 Tengo un super Bug puse el spawn en el area Segura pero no Sirve.... se pueden matar D:!!!
Recommended Posts