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

Wysłany: 2014-09-08, 15:59


maniek0611







Wiek: 35
Na forum: 4542 dni
Posty: 7



Respekt: 50

Witam mo?e kto? mi pom?c z markierami ? Mianowicie chodzi mi o to, aby pojawi? si? marker a w nim bro? kt?ra mo?e wzi?? tylko policja

Marker 2. Chodzi o to ?eby si? wy?wietla?o menu w nim i pisa?o podejmij prace i aktywowane komend? /loginpolicja.

Za pomoc :piwo: :piwo: :piwo:

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-09-08, 16:19


luki123luki123

Place Game






Wiek: 28
Na forum: 5275 dni
Posty: 1948
Nick w MP: LuKiO

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

maniek0611, 1.
local mxmymz 123
local Marker createMarker mxmymz"cylinder"1.52552550170 )
local ID1 "5" --//Podaj ID Broni

function isPlayerInACL playeracl )
    local account getPlayerAccount player )
    if ( isGuestAccount account ) ) then
        return false
    end
        return isObjectInACLGroup "user."..getAccountName account ), aclGetGroup acl ) )
end

function isPlayerInTeam(playerteam)
    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

function Markers (hitElementmatchingDimension)
local ElementType getElementTypehitElement )
    if ElementType == "player" then
        if isPlayerInACL(ElementType"Policja") and isPlayerInTeam(ElementType"Policja"then
        giveWeapon(ElementTypeID150000)
        local Model1 getWeaponNameFromID ID1 )
        outputChatBox("Wzo?e? bro? Policyjn?: "..Model1..""ElementType00200)
        else
        --//Nie nale?ysz do Policji
        end 
    end
end
addEventHandler"onMarkerHit"MarkerMarkers )


2.
local mxmymz 123
local Marker createMarker mxmymz"cylinder"1.52552550170 )

function isPlayerInACL playeracl )
    local account getPlayerAccount player )
    if ( isGuestAccount account ) ) then
        return false
    end
        return isObjectInACLGroup "user."..getAccountName account ), aclGetGroup acl ) )
end

function Markers (hitElementmatchingDimension)
local ElementType getElementTypehitElement )
    if ElementType == "player" then
        if isPlayerInACL(ElementType"Policja")  then
        outputChatBox("Wpisz Komende /loginpolicja aby si? zalogowa?."root00200)
        else
        --//Nie nale?ysz do Policji
        end 
    end
end
addEventHandler"onMarkerHit"MarkerMarkers )

function zaloguj (thePlayer)
if isElementWithinMarker thePlayerMarker then
    if isPlayerInACL(ElementType"Policja")  then
    outputChatBox("Zalogowa?e? si? do policji"thePlayer25500)
    setPlayerTeam thePlayer"Policja" ) 
    else
    outputChatBox("Nie nale?ysz do Policji"thePlayer25500)
    end
else
outputChatBox("Nie jeste? w Markerze"thePlayer25500)
end
end
addCommandHandler("loginpolicja"zaloguj)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-09-08, 16:38


maniek0611







Wiek: 35
Na forum: 4542 dni
Posty: 7



Respekt: 50

Dzi?ki za szybk? odpowied?, wszystko ?miga, ale
w 2 chodzi?o mi o panel i ?eby by? tam przycisk "Podejmij Prace" i aktywowa?o by si? to komend? "/loginpolicja"

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-09-08, 16:40


luki123luki123

Place Game






Wiek: 28
Na forum: 5275 dni
Posty: 1948
Nick w MP: LuKiO

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

maniek0611, ja nie b?de ci jeszcze paneli robi?..... ju? tak i tak zrobi?em za ciebie du?o. Gdzie jest moje PIWO !! :D

Postaw piwo autorowi tego posta
 

 
Tagi: markery
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Markery 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