Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2018-02-09, 19:53


Allansso







Wiek: 25
Na forum: 4079 dni
Posty: 386

Piwa: 1546

Respekt: 180
Respekt: 180Respekt: 180

Ostrzeżeń: 100%
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 :)

Podpis
https://www.youtube.com/TheMikol
https://www.facebook.com/TheMikol1337
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-09, 19:59


Kalizman







Wiek: 24
Na forum: 3792 dni
Posty: 1394

Piwa: 4624

Respekt: 358,8
Respekt: 358,8Respekt: 358,8Respekt: 358,8Respekt: 358,8

Potrzebne funkcje:
- takeAllWeapons
- setElementModel
- setPlayerTeam

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-09, 20:02


Ciastuuś

As-salamu alaykum






Wiek: 27
Na forum: 3212 dni
Posty: 800
Nick w MP: Ciastuuś

Piwa: 4304

Respekt: 640
Respekt: 640Respekt: 640

Do zabierania broni,


Więcej informacji znajdziesz w Wikipedii MTA:

takeWeapon


Skina,


Więcej informacji znajdziesz w Wikipedii MTA:

setElementModel


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 )


Podpis
As-salamu alaykum
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-09, 20:25


NyAngel







Wiek: 23
Na forum: 4091 dni
Posty: 128
Nick w MP: NyAngel

Piwa: 556

Respekt: 86,8



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)



Podpis
Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
Allansso
Wysłany: 2018-02-09, 20:25


Allansso







Wiek: 25
Na forum: 4079 dni
Posty: 386

Piwa: 1546

Respekt: 180
Respekt: 180Respekt: 180

Ostrzeżeń: 100%
Mo?na zamkn??!

Podpis
https://www.youtube.com/TheMikol
https://www.facebook.com/TheMikol1337
Postaw piwo autorowi tego posta
 

 
Tagi: logowanie :: wylogowywanie
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku