Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2015-02-19, 00:06


Daisu

Programista Lua






Wiek: 26
Na forum: 4444 dni
Posty: 193
SPONSOR
Nick w MP: Daisu

Piwa: 24

Respekt: 90

Witajcie jak zrobi? aby gracze nie widzieli policjant?w na mapie i radarze.

Mam skrypt na frakcje i nadawanie blip?w :



cywile11 createTeam "Cywile"255255255 addEventHandler("onPlayerLogin"root,
  function() 
  setPlayerTeam sourcecywile11 )
  setElementModel thePlayerblipcywil createBlipAttachedTo source02255255255222099999999getRootElement() ) 
  end
)
 
-- Administracja
local admin createTeam "Administracja"2550) 

function admin1 thePlayer local playerName getAccountName getPlayerAccount thePlayer ) ) 
if isObjectInACLGroup "user." .. playerNameaclGetGroup "Admin" ) ) then 
setPlayerTeam thePlayeradmin )
setPlayerNametagColor thePlayer2550)
blipadm createBlipAttachedTo thePlayer0225500222099999999getRootElement() )
else 

outputChatBox"Nie jestes Administratorem."thePlayerend 
end 
addCommandHandler "loginadmin"admin1 )

-- Policja
local poli createTeam"Policja"00255 )

function poli1thePlayer ) 
 local playerName getAccountName getPlayerAccount thePlayer ) ) 
 if isObjectInACLGroup "user." .. playerNameaclGetGroup "Policja" ) ) then 
  setPlayerTeam thePlayerpoli ) 
  giveWeapon thePlayer3110000 )
  giveWeapon thePlayer2310000 )
  giveWeapon thePlayer2910000 )
  giveWeapon thePlayer310000 )
  giveWeapon thePlayer3310000 )
  setPedArmor thePlayer100 ) 
  setPlayerNametagColor thePlayer00255 )
  setElementModel thePlayer280 ) 
 blips getElementsByType "blip" )
 local blippoli createBlipAttachedTo thePlayer0200255222099999999getRootElement() )
 destroyElementblip )

else 
  outputChatBox"Nie jestes pracownikiem Policji."thePlayer) 
 end 
end 
addCommandHandler "loginpolicja"poli1 )

--Urzad
local Urzad createTeam "Urzad/Instruktorzy"255224128) 

function Urzad1 thePlayer local playerName getAccountName getPlayerAccount thePlayer ) ) 
if isObjectInACLGroup "user." .. playerNameaclGetGroup "Urzad" ) ) then 
setPlayerTeam thePlayerUrzad setElementModel thePlayer68 setPlayerNametagColor thePlayer225224128 )
setBlipColor (thePlayer255224128 blipurzad createBlipAttachedTo thePlayer02255224128222099999999getRootElement() )
else 

outputChatBox"Nie jestes pracownikiem Urzedu."thePlayerend 
end 
addCommandHandler "loginurzad"Urzad1 )

--Pomoc Drogowa

local pd createTeam "Pomoc Drogowa"2551400) 


function pd1 thePlayer local playerName getAccountName getPlayerAccount thePlayer ) ) 
if isObjectInACLGroup "user." .. playerNameaclGetGroup "Pomoc Drogowa" ) ) then 
setPlayerTeam thePlayerpd )  
setElementModel thePlayer50 setPlayerNametagColor thePlayer255140)
setBlipColor (thePlayer255140blippd createBlipAttachedTo thePlayer022551400222099999999getRootElement() )
else 

outputChatBox"Nie jestes pracownikiem Pomocy Drogowej."thePlayerend 
end 
addCommandHandler "loginpd"pd1 )

-- Pogotowie--


local Pogotowie createTeam"Pogotowie"127255212 )

function Pogotowie1thePlayer ) 
 local playerName getAccountName getPlayerAccount thePlayer ) ) 
 if isObjectInACLGroup "user." .. playerNameaclGetGroup "Pogotowie" ) ) then 
  setPlayerTeam thePlayerPogotowie ) 
  setElementModel thePlayer275 ) 
  setPlayerNametagColor thePlayer127255212 ) 
  setBlipColor thePlayer127255212 )
blippogo createBlipAttachedTo thePlayer02127255212222099999999getRootElement() )
      giveWeapon thePlayer4110000 )
else 
  outputChatBox"Nie jestes pracownikiem Pogotowia."thePlayer) 
 end 
end 
addCommandHandler "loginpogo"Pogotowie1 )

--Taxi--
local taxi createTeam "Taxi"25525516 ) 


function taxi1 thePlayer local playerName getAccountName getPlayerAccount thePlayer ) ) 
if isObjectInACLGroup "user." .. playerNameaclGetGroup "Taxi" ) ) then 
setPlayerTeam thePlayertaxi )
setElementModel thePlayer255 setPlayerNametagColor thePlayer25525516 )
setBlipColor thePlayer25525516 bliptaxi createBlipAttachedTo thePlayer0225525516222099999999getRootElement() )
else 

outputChatBox"Nie jestes pracownikiem Taxi."thePlayerend 
end 
addCommandHandler "logintaxi"taxi1 )







function wyl1 thePlayer local playerName getAccountName getPlayerAccount thePlayer ) ) 
if isObjectInACLGroup "user." .. playerNameaclGetGroup "Everyone" ) ) then 
setPlayerTeam thePlayercywile11 )
createBlipAttachedTo thePlayer02255255255222099999999getRootElement() ) 
setPlayerNametagColor thePlayer255255255 )
setElementModel thePlayer) 
else 

outputChatBox"Debil"thePlayerend 
end 
addCommandHandler "wyloguj"wyl1 )



function girl thePlayer local playerName getAccountName getPlayerAccount thePlayer ) ) 
if isObjectInACLGroup "user." .. playerNameaclGetGroup "Everyone" ) ) then 
setElementModel thePlayer13 ) 
else 
outputChatBox"Debil"thePlayerend 
end 
addCommandHandler "girl"girl )

function girl1 thePlayer local playerName getAccountName getPlayerAccount thePlayer ) ) 
if isObjectInACLGroup "user." .. playerNameaclGetGroup "Everyone" ) ) then 
setElementModel thePlayer14 ) 
else 
outputChatBox"Debil"thePlayerend 
end 
addCommandHandler "girl1"girl1 )

function men thePlayer local playerName getAccountName getPlayerAccount thePlayer ) ) 
if isObjectInACLGroup "user." .. playerNameaclGetGroup "Everyone" ) ) then 
setElementModel thePlayer104 ) 
else 
outputChatBox"Debil"thePlayerend 
end 
addCommandHandler "men"men )




Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-02-19, 06:42


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4394 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Usu? z funkcji logowania policji tworznie blipu, ju? widz?, ?e nikomu si? nie chce ruszy? troch? g?ow?..

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-02-19, 12:26


Daisu

Programista Lua






Wiek: 26
Na forum: 4444 dni
Posty: 193
SPONSOR
Nick w MP: Daisu

Piwa: 24

Respekt: 90

Po zalogowaniu do policji zostaje blip z Cywili kod od policji:

-- Policja
local poli createTeam"Policja"00255 )

function poli1thePlayer ) 
 local playerName getAccountName getPlayerAccount thePlayer ) ) 
 if isObjectInACLGroup "user." .. playerNameaclGetGroup "Policja" ) ) then 
  setPlayerTeam thePlayerpoli ) 
  giveWeapon thePlayer3110000 )
  giveWeapon thePlayer2310000 )
  giveWeapon thePlayer2910000 )
  giveWeapon thePlayer310000 )
  giveWeapon thePlayer3310000 )
  setPedArmor thePlayer100 ) 
  setPlayerNametagColor thePlayer00255 )
  setElementModel thePlayer280 ) 

else 
  outputChatBox"Nie jestes pracownikiem Policji."thePlayer) 
 end 
end 
addCommandHandler "loginpolicja"poli1 )


[ Dodano: 2015-02-20, 00:52 ]
Pomo?e kto? ?

Podpis
Postaw piwo autorowi tego posta
 

 
Tagi: blip :: gracza :: (policjanta) :: nie :: widoczny :: dla :: innych
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

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
Dodaj temat do Ulubionych
Wersja do druku