Witam ma problem gdy? chce zeby brame mogli otwierac tylko ci ktorzy sa w teamie Policja, ale nie wiem jak to zrobic.Prosze o pomoc w nagrode
Client:
Server:
Radzi?bym zrobi? pod acl, mniej zabawy z usuwaniem graczy itp ale jak kto woli
function OpenGate(localPlayer)
triggerServerEvent ("onBrama1",localPlayer)
end
addCommandHandler("open",OpenGate)
function CloseGate(localPlayer)
triggerServerEvent ("onBrama2",localPlayer)
end
addCommandHandler("close",CloseGate)
------------------SERVER-----------------------
gate = createObject ( 980, -1630.9004, 688.2002, 9, 0, 0, 179.995 )
addEvent ( "onBrama1", true )
function Brama1()
local playerTeam = getPlayerTeam ( client )
if playerTeam=="Policja" then
moveObject (gate,2500, -1630.9004, 688.2002, 3)
else
return end
end
addEventHandler("onBrama1",root,Brama1)
addEvent ( "onBrama2", true )
function Brama2()
local playerTeam = getPlayerTeam ( client )
if playerTeam=="Policja" then
moveObject (gate,2500, -1630.9004, 688.2002, 9)
else
return end
end
addEventHandler("onBrama2",root,Brama2)
Radzi?bym zrobi? pod acl, mniej zabawy z usuwaniem graczy itp ale jak kto woli
function OpenGate(localPlayer)
triggerServerEvent ("onBrama1",localPlayer)
end
addCommandHandler("open",OpenGate)
function CloseGate(localPlayer)
triggerServerEvent ("onBrama2",localPlayer)
end
addCommandHandler("close",CloseGate)
------------------SERVER-----------------------
gate = createObject ( 980, -1630.9004, 688.2002, 9, 0, 0, 179.995 )
addEvent ( "onBrama1", true )
function Brama1()
local playerTeam = getPlayerTeam ( client )
if playerTeam=="Policja" then
moveObject (gate,2500, -1630.9004, 688.2002, 3)
else
return end
end
addEventHandler("onBrama1",root,Brama1)
addEvent ( "onBrama2", true )
function Brama2()
local playerTeam = getPlayerTeam ( client )
if playerTeam=="Policja" then
moveObject (gate,2500, -1630.9004, 688.2002, 9)
else
return end
end
addEventHandler("onBrama2",root,Brama2)
function OpenGate()
triggerServerEvent ("onBrama1",localPlayer)
end
addCommandHandler("open",OpenGate)
function CloseGate()
triggerServerEvent ("onBrama2",localPlayer)
end
addCommandHandler("close",CloseGate)
function OpenGate()
triggerServerEvent ("onBrama1",localPlayer)
end
addCommandHandler("open",OpenGate)
function CloseGate()
triggerServerEvent ("onBrama2",localPlayer)
end
addCommandHandler("close",CloseGate)
popraw clienta
Dobra teraz mi pisze jak jestem w teamie policja Brak Teamu
gate = createObject ( 980, -1630.9004, 688.2002, 9, 0, 0, 179.995 )
addEvent ( "onBrama1", true )
function Brama1()
local playerTeam = getPlayerTeam ( client )
if playerTeam then
local Team = getTeamName(playerTeam)
if Team=="Policja" then
moveObject (gate,2500, -1630.9004, 688.2002, 3)
end
end
end
addEventHandler("onBrama1",root,Brama1)
addEvent ( "onBrama2", true )
function Brama2()
local playerTeam = getPlayerTeam ( client )
if playerTeam then
local Team = getTeamName(playerTeam)
if Team=="Policja" then
moveObject (gate,2500, -1630.9004, 688.2002, 9)
end
end
end
addEventHandler("onBrama2",root,Brama2)
gate = createObject ( 980, -1630.9004, 688.2002, 9, 0, 0, 179.995 )
addEvent ( "onBrama1", true )
function Brama1()
local playerTeam = getPlayerTeam ( client )
if ( playerTeam ) then
if playerTeam=="Policja" then
moveObject (gate,2500, -1630.9004, 688.2002, 3)
end
else
outputChatBox("Brak teamu",client)
end
end
addEventHandler("onBrama1",root,Brama1)
addEvent ( "onBrama2", true )
function Brama2()
local playerTeam = getPlayerTeam ( client )
if ( playerTeam ) then
if playerTeam=="Policja" then
moveObject (gate,2500, -1630.9004, 688.2002, 9)
end
else
outputChatBox("Brak teamu",client)
end
end
addEventHandler("onBrama2",root,Brama2)
je?eli teraz b?dzie napis ?e nie masz teamu to znaczy ?e go nie masz.
Teraz to jak nie jestem w teamie policja to pisze ze nie jestem ale jak jestem to juz nie pisze ale i tak brama sie nie otwiera i zamyka
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach