Mam taki problem ...:
A taki problem z grupą jak wpisuję /loginpolicja to wyrzuca mnie za grupy wszystkie a powinienem po wpisaniu /loginpolicja lądować w grupie Policja..
Tak to wygląda na ss'y:
http://imageshack.us...66/grupybd.jpg/
O to kod skryptu :
--]]
Cywile = createTeam ( "Cywile", 255, 255, 255 )
mechanic = createTeam ( "Pomoc Drogowa", 152, 0, 225 )
medic = createTeam ( "Pogotowie", 32, 178, 170 )
police = createTeam ( "Policja", 30, 0, 255 )
taxi = createTeam ( "Taxi", 255, 225, 0 )
--55
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
function mechanic1 ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Pomoc Drogowa" ) ) then
setPlayerTeam ( thePlayer, mechanic )
giveWeapon ( thePlayer, 12, 10000 )
setPedArmor ( thePlayer, 100 )
setElementModel ( thePlayer, 50 )
setElementPosition ( thePlayer, -1553.325, 380.332, 8.64 )
setPlayerNametagColor ( thePlayer, 152, 0, 225 )
else
outputChatBox( "Nie jestes pracownikiem PD", player)
end
end
addCommandHandler ( "loginpd", mechanic1 )
function medic1 ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Pogotowie" ) ) then
setPlayerTeam ( thePlayer, medic )
giveWeapon ( thePlayer, 14, 10000 )
setPedArmor ( thePlayer, 100 )
setElementModel ( thePlayer, 274 )
setElementPosition ( thePlayer, -2434.843, 504.321, 29.948 )
setPlayerNametagColor ( thePlayer, 32, 178, 170 )
else
outputChatBox( "Nie jestes pracownikiem pogotowia", player)
end
end
addCommandHandler ( "loginpogo", medic1 )
function police1 ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Policja" ) ) then
setPlayerTeam ( thePlayer, police )
giveWeapon ( thePlayer, 3, 10000 )
giveWeapon ( thePlayer, 30, 10000 )
giveWeapon ( thePlayer, 24, 10000 )
giveWeapon ( thePlayer, 29, 10000 )
setPedArmor ( thePlayer, 100 )
setElementModel ( thePlayer, 281 )
setElementPosition ( thePlayer, -1584.5265, 710.208, -5.242 )
setPlayerNametagColor ( thePlayer, 30, 0, 255 )
else
outputChatBox( "Nie jestes pracownikiem Policji", player)
end
end
addCommandHandler ( "loginpolicja", police1 )
function taxi1 ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Taxi" ) ) then
setPlayerTeam ( thePlayer, taxi )
setElementModel ( thePlayer, 123 )
setElementPosition ( thePlayer, -1976.912, 540.654, 35.015 )
setPlayerNametagColor ( thePlayer, 255, 225, 0 )
else
outputChatBox( "Nie jestes pracownikiem Taxi", player)
end
end
addCommandHandler ( "logintaxi", taxi1 )
Więc co mam poprawić by było dobrze?
Bardzo proszę o pomoc !
Z góry dzięki