Jump to content

مشكلة


Recommended Posts

ابي كل ما يقتل شخص يجيه نقطه 

addEventHandler("onPlayerWasted", root,
function(_, point)
		if getPlayerTeam(source) ~= getTeamFromName("No Team") then
			getElementData(point,"Wasted")or 0)+1)
			triggerEvent("OnPointPolice",point)
			exports["guimessages"]:outputServer(point,"#00FF00Good Job You Have got 1 Point !",0, 255, 255)
			elseif getPlayerTeam(source) == getTeamFromName("Police") then
			triggerEvent("OnPointGang",point)
			getElementData(point,"Wasted")or 0)+1)
			exports["guimessages"]:outputServer(point,"#00FF00GooD Job You Won 1 Point !",0, 255, 255)
		end
end );

 

Link to comment
Just now, DmAr511 said:

ابي كل ما يقتل شخص يجيه نقطه 


addEventHandler("onPlayerWasted", root,
function(_, point)
		if getPlayerTeam(source) ~= getTeamFromName("No Team") then
			getElementData(point,"Wasted")or 0)+1)
			triggerEvent("OnPointPolice",point)
			exports["guimessages"]:outputServer(point,"#00FF00Good Job You Have got 1 Point !",0, 255, 255)
			elseif getPlayerTeam(source) == getTeamFromName("Police") then
			triggerEvent("OnPointGang",point)
			getElementData(point,"Wasted")or 0)+1)
			exports["guimessages"]:outputServer(point,"#00FF00GooD Job You Won 1 Point !",0, 255, 255)
		end
end );

 


ما فهمت وش تبي تسوي بالضبط بس جرب هذا


 

function setPoint ( _, killer )

	if getTeamName ( كمل ( source ) ) ~= getTeamFromName("No Team") then
	
		setElementData ( كمل ,"Wasted", ( getElementData( killer ,"Wasted" )or 0)+1 )
		triggerEvent ( كمل )
		exports["guimessages"]:outputServer( killer ,"#00FF00Good Job You Have got 1 Point !",0, 255, 255)
		
	elseif كمل ( getPlayerTeam( source ) ) == getTeamFromName("Police") then
	
		triggerEvent ( كمل )
		setElementData ( killer ,"Wasted", ( getElementData( كمل ,"Wasted" )or 0)+1 )
		exports["guimessages"]:outputServer( killer ,"#00FF00GooD Job You Won 1 Point !",0, 255, 255)
		
	end

end

addEventHandler("onPlayerWasted", root, setPoint )

 

Link to comment

كمل كودك :)

addEventHandler ( 'onPlayerWasted' , root ,
  function ( _ , aKiller ) 
    if ( getElementType ( source ) == 'player' ) then 
      if ( getPlayerTeam ( source ) ~= getTeamFromName ( 'NoTeam' ) ) then 
        local aData_ = getElementData ( aKiller , 'aDataKills' ) 
        setElementData ( aKiller , 'aDataKills' , tonumber ( aData_ ) + 1 ) 
      elseif ( getPlayerTeam ( source ) == getTeamFromName ( 'Police' ) ) then  
        local aData_ = getElementData ( aKiller , 'aDataKills' ) 
        setElementData ( aKiller , 'aDataKills' , tonumber ( aData_ ) + 1 ) 
      end 
    end 
  end 
)
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...