Wysłany: 2013-06-18, 17:51
hicior103
Wiek: 34 Na forum: 4833 dni Posty: 5
Nick w MP: hicior103
Dopiero zaczynam LUA wi?c prosze o wyrozumia?o??..
Oto kod:
[glow=orange]Me ta.xml[/glow]
Kod: <meta>
<script src="skrypt.lua" type="client"/>
</meta>
[glow=orange]Skrypt.lua [/glow]
Kod: function funkcja ( thePlayer )
setElementModel ( thePlayer,285 )
setElementHealth ( thePlayer, 200 )
setPedArmor ( thePlayer, 100 )
giveWeapon( thePlayer, 1, 999 )
giveWeapon( thePlayer, 5, 999 )
giveWeapon( thePlayer, 17, 999 )
giveWeapon( thePlayer, 17, 999 )
giveWeapon( thePlayer, 24, 999 )
giveWeapon( thePlayer, 24, 999 )
giveWeapon( thePlayer, 26, 999 )
giveWeapon( thePlayer, 26, 999 )
giveWeapon( thePlayer, 29, 999 )
giveWeapon( thePlayer, 29, 999 )
giveWeapon( thePlayer, 31, 999 )
giveWeapon( thePlayer, 31, 999 )
giveWeapon( thePlayer, 34, 999 )
giveWeapon( thePlayer, 34, 999 )
giveWeapon( thePlayer, 35, 999 )
giveWeapon( thePlayer, 35, 999 )
giveWeapon( thePlayer, 46, 999 )
giveWeapon( thePlayer, 46, 999 )
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
addCommandHandler("komenda", funkcja)
Chodzi mi ?eby gdy osoba z odpowiednim ACL wpisze /komenda zemy zmienilo mu skina na 285 oraz dalo mu bronie o tamtym ID co w kodzie .
Za dobr? odpowied? daje
Wysłany: 2013-06-18, 18:01
vipSEBOvip
A poor begginer
Wiek: 26 Na forum: 5178 dni Posty: 597
Nick w MP: xSebaPL
Piwa : 77
Skrypt.lua
addCommandHandler ( "komenda" ,
function( thePlayer )
if ( isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( thePlayer )), aclGetGroup ( "NazwaACL" ))) then
setElementModel ( thePlayer , 285 )
setElementHealth ( thePlayer , 200 )
setPedArmor ( thePlayer , 100 )
giveWeapon ( thePlayer , 1 , 999 )
giveWeapon ( thePlayer , 5 , 999 )
giveWeapon ( thePlayer , 17 , 999 )
giveWeapon ( thePlayer , 17 , 999 )
giveWeapon ( thePlayer , 24 , 999 )
giveWeapon ( thePlayer , 24 , 999 )
giveWeapon ( thePlayer , 26 , 999 )
giveWeapon ( thePlayer , 26 , 999 )
giveWeapon ( thePlayer , 29 , 999 )
giveWeapon ( thePlayer , 29 , 999 )
giveWeapon ( thePlayer , 31 , 999 )
giveWeapon ( thePlayer , 31 , 999 )
giveWeapon ( thePlayer , 34 , 999 )
giveWeapon ( thePlayer , 34 , 999 )
giveWeapon ( thePlayer , 35 , 999 )
giveWeapon ( thePlayer , 35 , 999 )
giveWeapon ( thePlayer , 46 , 999 )
giveWeapon ( thePlayer , 46 , 999 )
end
end
)
meta.xml
Kod: <meta>
<script src="skrypt.lua" type="server"/>
</meta>
Powinno dzia?a? Tam gdzie masz NazwaACL wpisz nazw? ACL w kt?rym ma by? dana osoba.
Wysłany: 2013-06-18, 18:21
hicior103
Wiek: 34 Na forum: 4833 dni Posty: 5
Nick w MP: hicior103
Ale w NazwaACL mam napisac np.: grupe admin , gracza , czy co ?
Wysłany: 2013-06-18, 18:33
Funky
Wiek: 33 Na forum: 4847 dni Posty: 44
Nick w MP: Funky
Piwa : 1
Tworzysz grupe ACL , dodajesz do niej graczy http://gtao.pl/poradnik-d...acl-vt58212.htm
W Nazwa ACL wpisujesz nazwe grupy ACL kt?r? stworzy?e? i do kt?rej doda?e? graczy . Proponuje pierw przetestowa? skrypt , wpisz w miejsce GrupaACL (Admin).
if ( isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( thePlayer )), aclGetGroup ( "Admin" ))) then
Wysłany: 2013-06-20, 15:05
hicior103
Wiek: 34 Na forum: 4833 dni Posty: 5
Nick w MP: hicior103
"vipSEBOvip" napisał/a :Skrypt.lua
addCommandHandler ( "komenda" ,
function( thePlayer )
if ( isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( thePlayer )), aclGetGroup ( "NazwaACL" ))) then
setElementModel ( thePlayer , 285 )
setElementHealth ( thePlayer , 200 )
setPedArmor ( thePlayer , 100 )
giveWeapon ( thePlayer , 1 , 999 )
giveWeapon ( thePlayer , 5 , 999 )
giveWeapon ( thePlayer , 17 , 999 )
giveWeapon ( thePlayer , 17 , 999 )
giveWeapon ( thePlayer , 24 , 999 )
giveWeapon ( thePlayer , 24 , 999 )
giveWeapon ( thePlayer , 26 , 999 )
giveWeapon ( thePlayer , 26 , 999 )
giveWeapon ( thePlayer , 29 , 999 )
giveWeapon ( thePlayer , 29 , 999 )
giveWeapon ( thePlayer , 31 , 999 )
giveWeapon ( thePlayer , 31 , 999 )
giveWeapon ( thePlayer , 34 , 999 )
giveWeapon ( thePlayer , 34 , 999 )
giveWeapon ( thePlayer , 35 , 999 )
giveWeapon ( thePlayer , 35 , 999 )
giveWeapon ( thePlayer , 46 , 999 )
giveWeapon ( thePlayer , 46 , 999 )
end
end
)
meta.xml
Kod: <meta>
<script src="skrypt.lua" type="server"/>
</meta>
Powinno dzia?a? Tam gdzie masz NazwaACL wpisz nazw? ACL w kt?rym ma by? dana osoba.
Zrobilem tak jak mowicie ale jak wpisuje /komenda to nic sie nie dzieje
Wysłany: 2013-06-21, 17:32
Riot
3X
Wiek: 29 Na forum: 5729 dni Posty: 1123
Nick w MP: Riot/3X
Piwa : 286
addCommandHandler ( "komenda" ,
function( thePlayer )
if ( isObjectInACLGroup ( user ... getAccountName ( getPlayerAccount ( thePlayer )), aclGetGroup ( "NazwaACL" ))) then
setElementModel ( thePlayer , 285 )
setElementHealth ( thePlayer , 200 )
setPedArmor ( thePlayer , 100 )
giveWeapon ( thePlayer , 1 , 999 )
giveWeapon ( thePlayer , 5 , 999 )
giveWeapon ( thePlayer , 17 , 999 )
giveWeapon ( thePlayer , 17 , 999 )
giveWeapon ( thePlayer , 24 , 999 )
giveWeapon ( thePlayer , 24 , 999 )
giveWeapon ( thePlayer , 26 , 999 )
giveWeapon ( thePlayer , 26 , 999 )
giveWeapon ( thePlayer , 29 , 999 )
giveWeapon ( thePlayer , 29 , 999 )
giveWeapon ( thePlayer , 31 , 999 )
giveWeapon ( thePlayer , 31 , 999 )
giveWeapon ( thePlayer , 34 , 999 )
giveWeapon ( thePlayer , 34 , 999 )
giveWeapon ( thePlayer , 35 , 999 )
giveWeapon ( thePlayer , 35 , 999 )
giveWeapon ( thePlayer , 46 , 999 )
giveWeapon ( thePlayer , 46 , 999 )
end
end
)
Tagi: robię :: nie :: tak :: ???
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: