Wysłany: 2018-02-09, 19:53
Allansso
Wiek: 24 Na forum: 3938 dni Posty: 386
Piwa : 1537
Witum
Mam taki o kodzik:
Kod: local Skinmarker = createMarker ( -326, 1027.55, 18.5, "cylinder", 1.3, 33, 33, 33, 255 )
local theTeam = createTeam ( "San Andreas Medicial Department", 240, 5, 0 )
addEventHandler ( "onMarkerHit", Skinmarker,
function ( hitElement )
if ( isPedInVehicle ( hitElement ) ) then
return
end
if ( not isPolicja ( hitElement ) ) then
return
end
setElementModel ( hitElement, 275 )
setPlayerTeam ( hitElement, theTeam )
giveWeapon ( hitElement, 41, 50000, true )
giveWeapon ( hitElement, 46, 1, true )
giveWeapon ( hitElement, 44, 1, true )
end
)
function isPolicja ( thePlayer )
if ( not thePlayer ) then
return false
end
local accName = getAccountName ( getPlayerAccount ( thePlayer ) )
return isObjectInACLGroup ("user."..accName, aclGetGroup ( "SAMD" ) )
end
I jak zrobi? aby po ponownym wej?ciu w marker zabiera?o nam bron, skina i dawa?o na team Cywil?
Za Ch?ci pifko i respekt
Wysłany: 2018-02-09, 19:59
Kalizman
Wiek: 23 Na forum: 3651 dni Posty: 1394
Piwa : 4619
Potrzebne funkcje:
- takeAllWeapons
- setElementModel
- setPlayerTeam
Wysłany: 2018-02-09, 20:02
Ciastuuś
Truck soon...
Wiek: 26 Na forum: 3071 dni Posty: 799
Nick w MP: Ciastuuś
Piwa : 4297
Do zabierania broni,
Więcej informacji znajdziesz w Wikipedii MTA: takeWeapon
Skina,
Team Cywil,
local druzynaMarker = createMarker ( 0 , 0 , 0 , 'cylinder' , 1.0 , 255 , 255 , 255 , 255 )
function funckjaMarker ( hitElement , matchingDimension )
if getElementType ( hitElement ) == "player" and not isPedInVehicle ( hitElement ) then
setPlayerTeam ( hitElement , Cywil )
end
end
addEventHandler ( "onMarkerHit" , druzynaMarker , funckjaMarker )
Wysłany: 2018-02-09, 20:25
NyAngel
Wiek: 22 Na forum: 3950 dni Posty: 128
Nick w MP: NyAngel
Piwa : 556
local x , y , z = - 16.13357 , - 317.47781 , 5.42285 - 1 -- pozycja x , y , z - zmie ? j ?
local marker = createMarker ( x , y , z , "cylinder" , 1.3 , 33 , 33 , 33 , 255 )
local team = createTeam ( "San Andreas Medicial Department" , 240 , 5 , 0 )
local blip = createBlip ( x , y , z , 21 ) -- x , y , z , id
function duty_marker ( hit )
if getElementType ( hit ) == "player" and not isPedInVehicle ( hit ) then
if getElementData ( hit , "duty" ) == false then
local id = getElementModel ( hit )
setElementData ( hit , "skin" , id )
setElementData ( hit , "duty" , true )
setElementModel ( hit , 275 )
setPlayerTeam ( hit , team )
giveWeapon ( hit , 41 , 50000 , true )
giveWeapon ( hit , 46 , 1 , true )
giveWeapon ( hit , 44 , 1 , true )
else
local skin = getElementData ( hit , "skin" )
setPlayerTeam ( hit , nil )
setElementModel ( hit , skin )
setElementData ( hit , "duty" , false )
takeAllWeapons ( hit )
end
end
end
addEventHandler ( "onMarkerHit" , marker , duty_marker )
Więcej szczegółów
Wystawiono 1 piw(a):Allansso
Wysłany: 2018-02-09, 20:25
Allansso
Wiek: 24 Na forum: 3938 dni Posty: 386
Piwa : 1537
Tagi: logowanie :: wylogowywanie
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: