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
Witajcie jak zrobi? aby gracze nie widzieli policjant?w na mapie i radarze.
Mam skrypt na frakcje i nadawanie blip?w :
cywile11 = createTeam ( "Cywile" , 255 , 255 , 255 )
addEventHandler ( "onPlayerLogin" , root ,
function()
setPlayerTeam ( source , cywile11 )
setElementModel ( thePlayer , 0 )
blipcywil = createBlipAttachedTo ( source , 0 , 2 , 255 , 255 , 255 , 222 , 0 , 99999999 , getRootElement () )
end
)
-- Administracja
local admin = createTeam ( "Administracja" , 255 , 0 , 0 )
function admin1 ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName , aclGetGroup ( "Admin" ) ) then
setPlayerTeam ( thePlayer , admin )
setPlayerNametagColor ( thePlayer , 255 , 0 , 0 )
blipadm = createBlipAttachedTo ( thePlayer , 0 , 2 , 255 , 0 , 0 , 222 , 0 , 99999999 , getRootElement () )
else
outputChatBox ( "Nie jestes Administratorem." , thePlayer )
end
end
addCommandHandler ( "loginadmin" , admin1 )
-- Policja
local poli = createTeam ( "Policja" , 0 , 0 , 255 )
function poli1 ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName , aclGetGroup ( "Policja" ) ) then
setPlayerTeam ( thePlayer , poli )
giveWeapon ( thePlayer , 31 , 10000 )
giveWeapon ( thePlayer , 23 , 10000 )
giveWeapon ( thePlayer , 29 , 10000 )
giveWeapon ( thePlayer , 3 , 10000 )
giveWeapon ( thePlayer , 33 , 10000 )
setPedArmor ( thePlayer , 100 )
setPlayerNametagColor ( thePlayer , 0 , 0 , 255 )
setElementModel ( thePlayer , 280 )
blips = getElementsByType ( "blip" )
local blippoli = createBlipAttachedTo ( thePlayer , 0 , 2 , 0 , 0 , 255 , 222 , 0 , 99999999 , getRootElement () )
destroyElement ( blip )
else
outputChatBox ( "Nie jestes pracownikiem Policji." , thePlayer )
end
end
addCommandHandler ( "loginpolicja" , poli1 )
-- Urzad
local Urzad = createTeam ( "Urzad/Instruktorzy" , 255 , 224 , 128 )
function Urzad1 ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName , aclGetGroup ( "Urzad" ) ) then
setPlayerTeam ( thePlayer , Urzad )
setElementModel ( thePlayer , 68 )
setPlayerNametagColor ( thePlayer , 225 , 224 , 128 )
setBlipColor ( thePlayer , 255 , 224 , 128 )
blipurzad = createBlipAttachedTo ( thePlayer , 0 , 2 , 255 , 224 , 128 , 222 , 0 , 99999999 , getRootElement () )
else
outputChatBox ( "Nie jestes pracownikiem Urzedu." , thePlayer )
end
end
addCommandHandler ( "loginurzad" , Urzad1 )
-- Pomoc Drogowa
local pd = createTeam ( "Pomoc Drogowa" , 255 , 140 , 0 )
function pd1 ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName , aclGetGroup ( "Pomoc Drogowa" ) ) then
setPlayerTeam ( thePlayer , pd )
setElementModel ( thePlayer , 50 )
setPlayerNametagColor ( thePlayer , 255 , 140 , 0 )
setBlipColor ( thePlayer , 255 , 140 , 0 )
blippd = createBlipAttachedTo ( thePlayer , 0 , 2 , 255 , 140 , 0 , 222 , 0 , 99999999 , getRootElement () )
else
outputChatBox ( "Nie jestes pracownikiem Pomocy Drogowej." , thePlayer )
end
end
addCommandHandler ( "loginpd" , pd1 )
-- Pogotowie --
local Pogotowie = createTeam ( "Pogotowie" , 127 , 255 , 212 )
function Pogotowie1 ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName , aclGetGroup ( "Pogotowie" ) ) then
setPlayerTeam ( thePlayer , Pogotowie )
setElementModel ( thePlayer , 275 )
setPlayerNametagColor ( thePlayer , 127 , 255 , 212 )
setBlipColor ( thePlayer , 127 , 255 , 212 )
blippogo = createBlipAttachedTo ( thePlayer , 0 , 2 , 127 , 255 , 212 , 222 , 0 , 99999999 , getRootElement () )
giveWeapon ( thePlayer , 41 , 10000 )
else
outputChatBox ( "Nie jestes pracownikiem Pogotowia." , thePlayer )
end
end
addCommandHandler ( "loginpogo" , Pogotowie1 )
-- Taxi --
local taxi = createTeam ( "Taxi" , 255 , 255 , 16 )
function taxi1 ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName , aclGetGroup ( "Taxi" ) ) then
setPlayerTeam ( thePlayer , taxi )
setElementModel ( thePlayer , 255 )
setPlayerNametagColor ( thePlayer , 255 , 255 , 16 )
setBlipColor ( thePlayer , 255 , 255 , 16 )
bliptaxi = createBlipAttachedTo ( thePlayer , 0 , 2 , 255 , 255 , 16 , 222 , 0 , 99999999 , getRootElement () )
else
outputChatBox ( "Nie jestes pracownikiem Taxi." , thePlayer )
end
end
addCommandHandler ( "logintaxi" , taxi1 )
function wyl1 ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName , aclGetGroup ( "Everyone" ) ) then
setPlayerTeam ( thePlayer , cywile11 )
createBlipAttachedTo ( thePlayer , 0 , 2 , 255 , 255 , 255 , 222 , 0 , 99999999 , getRootElement () )
setPlayerNametagColor ( thePlayer , 255 , 255 , 255 )
setElementModel ( thePlayer , 0 )
else
outputChatBox ( "Debil" , thePlayer )
end
end
addCommandHandler ( "wyloguj" , wyl1 )
function girl ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName , aclGetGroup ( "Everyone" ) ) then
setElementModel ( thePlayer , 13 )
else
outputChatBox ( "Debil" , thePlayer )
end
end
addCommandHandler ( "girl" , girl )
function girl1 ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName , aclGetGroup ( "Everyone" ) ) then
setElementModel ( thePlayer , 14 )
else
outputChatBox ( "Debil" , thePlayer )
end
end
addCommandHandler ( "girl1" , girl1 )
function men ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName , aclGetGroup ( "Everyone" ) ) then
setElementModel ( thePlayer , 104 )
else
outputChatBox ( "Debil" , thePlayer )
end
end
addCommandHandler ( "men" , men )
Wysłany: 2015-02-19, 06:42
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
Usu? z funkcji logowania policji tworznie blipu, ju? widz?, ?e nikomu si? nie chce ruszy? troch? g?ow?..
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
Po zalogowaniu do policji zostaje blip z Cywili kod od policji:
-- Policja
local poli = createTeam ( "Policja" , 0 , 0 , 255 )
function poli1 ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName , aclGetGroup ( "Policja" ) ) then
setPlayerTeam ( thePlayer , poli )
giveWeapon ( thePlayer , 31 , 10000 )
giveWeapon ( thePlayer , 23 , 10000 )
giveWeapon ( thePlayer , 29 , 10000 )
giveWeapon ( thePlayer , 3 , 10000 )
giveWeapon ( thePlayer , 33 , 10000 )
setPedArmor ( thePlayer , 100 )
setPlayerNametagColor ( thePlayer , 0 , 0 , 255 )
setElementModel ( thePlayer , 280 )
else
outputChatBox ( "Nie jestes pracownikiem Policji." , thePlayer )
end
end
addCommandHandler ( "loginpolicja" , poli1 )
[ Dodano : 2015-02-20, 00:52 ]
Pomo?e kto? ?
Tagi: blip :: gracza :: (policjanta) :: nie :: widoczny :: dla :: innych
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: