Jump to content

[HELP]Gang System


Recommended Posts

function CrimeGang(player)

if getPlayerTeam(player) ~= CRIMETeam then

if isElementWithinMarker(player, myMarker7) then

setPlayerTeam(player, CRIMETeam)

outputChatBox("#FF0000[CRIME]#FFFFFF You are now #FF0000A Crime !", player, 0, 0, 0, true)

end

end

end

addCommandHandler("crime", CrimeGang)

function criminal ( thePlayer, matchingDimension )

if isElementWithinMarker(thePlayer, myMarker7) then

giveWeapon(thePlayer, 4, 1)

setElementModel(thePlayer, 28)

else

outputChatBox("You Are not At The Right Place!", thePlayer, 255, 0, 0)

end

end

addCommandHandler("crime", criminal)

function onSpawn()

if getPlayerTeam(source) == CRIMETeam then

setElementPosition(source, 1292.5395507813, -771.5126953125, 95.961303710938)

end

end

addEventHandler("onPlayerSpawn", root, onSpawn)

addEventHandler("onMarkerHit", myMarker7,

function(player)

if getElementType(player) == "player" then

outputChatBox("#FF0000[CRIME]#FFFFFFTo become a #FF0000CRIME #FFFFFFwrite /crime", player, 0, 0, 0, true)

end

end)

function LeaveCRIME(player)

if getPlayerTeam(player) then

setPlayerTeam(player, nil)

outputChatBox("#FF0000[CRIME]#0000FF You leaved in CRIME Gang", player, 255, 255, 255, true)

else

outputChatBox("#FF0000[CRIME]#0000FF You Dont Have a gang.", player, 255, 255, 255, true)

end

end

addCommandHandler("leavecrime", LeaveCRIME)

function gang ( )

if getPlayerTeam(source) ~= CRIMETeam then

setPlayerTeam(source, nil)

end

end

addEventHandler("onPlayerLogin", getRootElement(), gang)

this is my script i want it cannot be deleted Thanks in Advance ... :D

Link to comment
function CrimeGang(player) 
if getPlayerTeam(player) ~= "CRIMETeam" then 
if isElementWithinMarker(player, myMarker7) then 
setPlayerTeam(player, CRIMETeam) 
outputChatBox("#FF0000[CRIME]#FFFFFF You are now #FF0000A Crime !", player, 0, 0, 0, true) 
end 
end 
end 
addCommandHandler("crime", CrimeGang) 
  
function criminal ( thePlayer, matchingDimension ) 
if isElementWithinMarker(thePlayer, myMarker7) then 
giveWeapon(thePlayer, 4, 1) 
setElementModel(thePlayer, 28) 
else 
outputChatBox("You Are not At The Right Place!", thePlayer, 255, 0, 0) 
end 
end 
addCommandHandler("crime", criminal) 
  
function onSpawn() 
if getPlayerTeam(source) == "CRIMETeam" then 
setElementPosition(source, 1292.5395507813, -771.5126953125, 95.961303710938) 
end 
end 
addEventHandler("onPlayerSpawn", root, onSpawn) 
  
addEventHandler("onMarkerHit", myMarker7, 
function(player) 
if getElementType(player) == "player" then 
outputChatBox("#FF0000[CRIME]#FFFFFFTo become a #FF0000CRIME #FFFFFFwrite /crime", player, 0, 0, 0, true) 
end 
end) 
  
function LeaveCRIME(player) 
if getPlayerTeam(player) then 
setPlayerTeam(player, nil) 
outputChatBox("#FF0000[CRIME]#0000FF You leaved in CRIME Gang", player, 255, 255, 255, true) 
else 
outputChatBox("#FF0000[CRIME]#0000FF You Dont Have a gang.", player, 255, 255, 255, true) 
end 
end 
addCommandHandler("leavecrime", LeaveCRIME) 
  
function gang ( ) 
if getPlayerTeam(source) ~= CRIMETeam then 
setPlayerTeam(source, nil) 
end 
end 
addEventHandler("onPlayerLogin", getRootElement(), gang) 

Link to comment
function CrimeGang(player) 
if getPlayerTeam(player) ~= "CRIMETeam" then 
if isElementWithinMarker(player, myMarker7) then 
setPlayerTeam(player, CRIMETeam) 
outputChatBox("#FF0000[CRIME]#FFFFFF You are now #FF0000A Crime !", player, 0, 0, 0, true) 
end 
end 
end 
addCommandHandler("crime", CrimeGang) 
  
function criminal ( thePlayer, matchingDimension ) 
if isElementWithinMarker(thePlayer, myMarker7) then 
giveWeapon(thePlayer, 4, 1) 
setElementModel(thePlayer, 28) 
else 
outputChatBox("You Are not At The Right Place!", thePlayer, 255, 0, 0) 
end 
end 
addCommandHandler("crime", criminal) 
  
function onSpawn() 
if getPlayerTeam(source) == "CRIMETeam" then 
setElementPosition(source, 1292.5395507813, -771.5126953125, 95.961303710938) 
end 
end 
addEventHandler("onPlayerSpawn", root, onSpawn) 
  
addEventHandler("onMarkerHit", myMarker7, 
function(player) 
if getElementType(player) == "player" then 
outputChatBox("#FF0000[CRIME]#FFFFFFTo become a #FF0000CRIME #FFFFFFwrite /crime", player, 0, 0, 0, true) 
end 
end) 
  
function LeaveCRIME(player) 
if getPlayerTeam(player) then 
setPlayerTeam(player, nil) 
outputChatBox("#FF0000[CRIME]#0000FF You leaved in CRIME Gang", player, 255, 255, 255, true) 
else 
outputChatBox("#FF0000[CRIME]#0000FF You Dont Have a gang.", player, 255, 255, 255, true) 
end 
end 
addCommandHandler("leavecrime", LeaveCRIME) 
  
function gang ( ) 
if getPlayerTeam(source) ~= CRIMETeam then 
setPlayerTeam(source, nil) 
end 
end 
addEventHandler("onPlayerLogin", getRootElement(), gang) 

getPlayerTeam is return team element

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...