Wysłany: 2014-09-13, 19:25
xBolekk
Wiek: 24 Na forum: 4474 dni Posty: 113
Nick w MP: Bolek.
Piwa : 190
Siemka, mam taki kod, kt?ry po wej?ciu w pickup nadaje skin, lecz chcia?bym, aby ten skin mo?na by?oby pobra? tylko je?li jest si? w teamie SAPD.
Oto kod, pom??cie, prosz?!
ID_SKINA = 280
pickup = createPickup ( 261.22680664063 , 111.42124938965 , 1004.6171875 , 3 , 1275 , 0 , 0 )
setElementInterior ( pickup , 10 )
addEventHandler ( "onPickupHit" , pickup , function( hitElement , matchingDimension )
setElementModel ( hitElement , ID_SKINA )
end
end )
Wysłany: 2014-09-13, 19:46
Blur
Wiek: 28 Na forum: 4298 dni Posty: 47
Nick w MP: Blu
Piwa : 2
skinSa = 280
pickup = createPickup ( 261.22680664063 , 111.42124938965 , 1004.6171875 , 3 , 1275 , 0 , 0 )
setElementInterior ( pickup , 10 )
addEventHandler ( "onPickupHit" , pickup , function( hitElement , matchingDimension )
if getPlayerTeam ( hitElement ) == "SAPD" then
setElementModel ( hitElement , skinSa )
end
end )
Wysłany: 2014-09-13, 19:49
xBolekk
Wiek: 24 Na forum: 4474 dni Posty: 113
Nick w MP: Bolek.
Piwa : 190
Nie dziala .
Wysłany: 2014-09-13, 19:51
luki123luki123
Place Game
Wiek: 28 Na forum: 5275 dni Posty: 1948
Nick w MP: LuKiO
Piwa : 6101
Blur , troche ?le bo jak nie ma teamu SAPD to we?mie ten skin polecam t? funkcj?.
Kod:
ID_SKINA = 280
function isPlayerInTeam ( player , team )
assert ( isElement ( player ) and getElementType ( player ) == "player" , "Bad argument 1 @ isPlayerInTeam [player expected, got " .. tostring ( player ) .. "]" )
assert (( not team ) or type ( team ) == "string" or ( isElement ( team ) and getElementType ( team ) == "team" ), "Bad argument 2 @ isPlayerInTeam [nil/string/team expected, got " .. tostring ( team ) .. "]" )
return getPlayerTeam ( player ) == ( type ( team ) == "string" and getTeamFromName ( team ) or ( type ( team ) == "userdata" and team or ( getPlayerTeam ( player ) or true )))
end
pickup = createPickup ( 261.22680664063 , 111.42124938965 , 1004.6171875 , 3 , 1275 , 0 , 0 )
setElementInterior ( pickup , 10 )
addEventHandler ( "onPickupHit" , pickup , function( hitElement , matchingDimension )
if isPlayerInTeam ( player , "SAPD" ) then
setElementModel ( hitElement , ID_SKINA )
end
end
end )
[ Dodano : 2014-09-13, 19:53 ]
@Upade:
ID_SKINA = 280
function isPlayerInTeam ( player , team )
assert ( isElement ( player ) and getElementType ( player ) == "player" , "Bad argument 1 @ isPlayerInTeam [player expected, got " .. tostring ( player ) .. "]" )
assert (( not team ) or type ( team ) == "string" or ( isElement ( team ) and getElementType ( team ) == "team" ), "Bad argument 2 @ isPlayerInTeam [nil/string/team expected, got " .. tostring ( team ) .. "]" )
return getPlayerTeam ( player ) == ( type ( team ) == "string" and getTeamFromName ( team ) or ( type ( team ) == "userdata" and team or ( getPlayerTeam ( player ) or true )))
end
pickup = createPickup ( 261.22680664063 , 111.42124938965 , 1004.6171875 , 3 , 1275 , 0 , 0 )
setElementInterior ( pickup , 10 )
function( thePlayer )
if isPlayerInTeam ( player , "SAPD" ) then
setElementModel ( thePlayer , ID_SKINA )
end
end
addEventHandler ( "onPickupHit" , pickup , Pickup , false )
Wysłany: 2014-09-13, 20:23
xBolekk
Wiek: 24 Na forum: 4474 dni Posty: 113
Nick w MP: Bolek.
Piwa : 190
Wysłany: 2014-09-13, 20:25
luki123luki123
Place Game
Wiek: 28 Na forum: 5275 dni Posty: 1948
Nick w MP: LuKiO
Piwa : 6101
xBolekk , usu? false w ostatniej linijce.
Wysłany: 2014-09-14, 15:56
Zbyklon
Wiek: 50 Na forum: 4290 dni Posty: 45
Nick w MP: Zbyklon
Piwa : 7
Pisz? za bolka -- Nadal nie dzia?a
//wycinek z log?w b??du
[2014-09-14 16:03] Skiny-policja restarted successfully
[2014-09-14 16:03] ERROR: Loading script failed: Skiny-policja/skins.lua:12: '' expected near '('
[2014-09-14 16:03] SCRIPT ERROR: Skiny-policja/skins.lua:12: '' expected near '('
[2014-09-14 16:03] Starting Skiny-policja
[2014-09-14 16:03] Resource 'Skiny-policja' changed, reloading and starting
[2014-09-14 16:03] Stopping Skiny-policja
[2014-09-14 16:03] ADMIN: Resource 'Skiny-policja' restarted by AeroX
//12 linijka :
Wysłany: 2014-09-15, 14:24
Jacob
Głupiomądry
Wiek: 28 Na forum: 5502 dni Posty: 967
Nick w MP: Jacob
Piwa : 786
ID_SKINA = 280
pickup = createPickup ( 261.22680664063 , 111.42124938965 , 1004.6171875 , 3 , 1275 , 0 , 0 )
setElementInterior ( pickup , 10 )
addEventHandler ( "onPickupHit" , pickup ,
function ( hitElement , matchingDimension )
if ( getElementType ( hitElement ) == "player" ) then
local team = getPlayerTeam ( hitElement )
if ( team == getTeamFromName ( "SAPD" ) ) then
setElementModel ( hitElement , ID_SKINA )
end
end
end
)
Wysłany: 2014-09-19, 15:44
xBolekk
Wiek: 24 Na forum: 4474 dni Posty: 113
Nick w MP: Bolek.
Piwa : 190
Blip si? respi jednak nie nadaje skina
Tagi: skin :: tylko :: dla :: teamu.
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: