جرب ورد لي خبر
local groupName = 'WAWI'
local health = {}
Door = createObject(980,1838.0999755859,888.29998779297,15.300000190735,0,0,90)
markerDoor = createMarker(1838.0999755859,888.29998779297,15.300000190735,"cylinder",13,0,0,0,0)
health1 = createMarker(1948.3400878906,899.49377441406,13.3,"cylinder",2,255,0,0,255)
health2 = createMarker(0,0,0,"cylinder",0,0,0,0,0)
eH = createMarker(1950.4020996094,892.09954833984,15,"arrow",1.5,0,255,0,255)
oH = createMarker(2233.8999023438,1714.5999755859,1013.803527832,"arrow",2,0,255,0,255)
setElementDimension( oH, 20 )
setElementInterior( oH, 1 )
createBlip(1893.8000488281,888.29998779297,13.5,23)
fix = createMarker(1885.9619140625,907.9404296875,13,"cylinder",4,0,0,0,255)
addEventHandler("onMarkerHit",root,
function ( hPlayer )
if ( source == markerDoor ) then
if getElementData( hPlayer, 'gang' ) == groupName and getPlayerTeam( hPlayer ) and getTeamName( getPlayerTeam( hPlayer ) ) == 'No Team' then
moveObject( Door, 500,1838.0999755859,888.29998779297,20 )
else
outputChatBox( 'Only '..groupName..' !', hPlayer, 255, 0, 255 )
end
elseif ( source == health1 ) then
if getElementData( hPlayer, 'gang' ) == groupName and getPlayerTeam( hPlayer ) and getTeamName( getPlayerTeam( hPlayer ) ) == 'No Team' then
fixVehicle( getPedOccupiedVehicle( hPlayer ) )
setPedArmor( hPlayer, 100 )
setElementHealth( hPlayer, 100 )
end
elseif ( source == eH ) then
if getElementData( hPlayer, 'gang' ) == groupName and getPlayerTeam( hPlayer ) and getTeamName( getPlayerTeam( hPlayer ) ) == 'No Team' and not isPedInVehicle( hPlayer ) then
setElementDimension( hPlayer, 20 )
setElementPosition( hPlayer, 2234,1710,1012 )
setElementInterior( hPlayer, 1 )
setPedArmor( hPlayer, 100 )
setElementHealth( hPlayer, 100 )
outputChatBox('Welcome '..getPlayerName( hPlayer )..' !', hPlayer, 0, 255, 0 )
else
outputChatBox('Only '..groupName..' !', hPlayer, 0, 255, 0 )
end
elseif ( source == oH ) then
if getElementData( hPlayer, 'gang' ) == groupName and getPlayerTeam( hPlayer ) and getTeamName( getPlayerTeam( hPlayer ) ) == 'No Team' and not isPedInVehicle( hPlayer ) then
setElementDimension( hPlayer, 0 )
setElementPosition( hPlayer, 1944,892,15 )
setElementInterior( hPlayer, 0 )
outputChatBox('See You Soon '..getPlayerName( hPlayer )..' !', hPlayer, 0, 255, 0 )
end
elseif ( source == fix ) then
if getElementData( hPlayer, 'gang' ) == groupName and getPlayerTeam( hPlayer ) and getTeamName( getPlayerTeam( hPlayer ) ) == 'No Team' then
fixVehicle( getPedOccupiedVehicle( hPlayer ) )
outputChatBox('Your Car Has Been Fixed !',hPlayer,0,255,0)
end
end
end
)
addEventHandler("onMarkerLeave",root,
function ( hPlayer )
if ( source == markerDoor ) then
if getElementData( hPlayer, 'gang' ) == groupName and getPlayerTeam( hPlayer ) and getTeamName( getPlayerTeam( hPlayer ) ) == 'No Team' then
moveObject(Door,500,1838.0999755859,888.29998779297,15.300000190735)
end
end
end
)
onWasted = function()
if getPlayerTeam( source ) and getTeamName( getPlayerTeam( source ) ) == 'No Team' and getElementData ( source , "gang" ) == groupName then
function sp( source )
setElementDimension( source, 20 )
setPedSkin( source, 34 )
setElementPosition( source, 2236,1675,1009 )
setElementInterior( source, 1 )
setPedArmor( source, 100 )
end
setTimer(sp,1000,1,source)
end
end
addEventHandler ( "onPlayerSpawn", getRootElement(), onWasted )