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: 24
Na forum: 3938 dni
Posty: 386

Piwa: 1537

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: 23
Na forum: 3651 dni
Posty: 1394

Piwa: 4619

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ś

Truck soon...






Wiek: 26
Na forum: 3071 dni
Posty: 799
Nick w MP: Ciastuuś

Piwa: 4297

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(000'cylinder'1.0255255255255 ) 

function funckjaMarkerhitElementmatchingDimension ) 
    if getElementTypehitElement ) == "player" and not isPedInVehicle(hitElementthen 
        setPlayerTeam hitElementCywil)
  end 
end 
addEventHandler"onMarkerHit"druzynaMarker funckjaMarker )


Podpis
Truck soon...
Postaw piwo autorowi tego posta
 

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


NyAngel







Wiek: 22
Na forum: 3950 dni
Posty: 128
Nick w MP: NyAngel

Piwa: 556

Respekt: 86,8



local x,y,= -16.13357, -317.477815.42285--- pozycja x,y,zmiej?
local marker createMarker(x,y,z"cylinder"1.3333333255 local team createTeam"San Andreas Medicial Department"2405local blip createBlip(x,y,z,21) -- x,y,z,id

function duty_marker(hit)
    if getElementType(hit) == "player" and not isPedInVehicle(hitthen 
    if getElementData(hit,"duty") == false then
    local id getElementModel(hit)
    setElementData(hit,"skin",id)
    setElementData(hit,"duty",true)
    setElementModel (hit275 ) 
    setPlayerTeam(hit,team)
    giveWeapon (hit4150000true ) 
    giveWeapon (hit461true ) 
    giveWeapon (hit441true )
    else
    local skin getElementData(hit,"skin")
    setPlayerTeam (hitnil ) 
    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: 24
Na forum: 3938 dni
Posty: 386

Piwa: 1537

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