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

Wysłany: 2015-11-30, 02:24


Prezes.







Wiek: 27
Na forum: 4370 dni
Posty: 75
Nick w MP: Prezes.

Piwa: 17

Respekt: 60

@MaxVee Nie za bardzo, spr?buj tak zrobi?:

local spawn = {
{x,y,z,rx,ry,rz},
{x,y,z,rx,ry,rz},
}

function spawn()
    local losuj math.random(1,#spawn)
    spawnPlayer(source,spawn[losuj][1],spawn[losuj[2],spawn[losuj[3],spawn[losuj][4],spawn[losuj][5],spawn[losuj][6])
    fadeCamera(sourcetrue)
    setCameraTarget(sourcesource)
    outputChatBox("Witaj na serwerze RPG!",source)
end

addEventHandler("onPlayerJoin",getRootElement(),spawn)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-06, 12:25


Deverter







Wiek: 32
Na forum: 4252 dni
Posty: 12



Respekt: 50

Da rade kto? przerobi? ten skrypt tak aby lakiernia by?a w gara?u (id: 7) Willowfield (ten z lowriderami)? Pr?bowa?em przerobi?, ale gdy kto? stoi autem w gara?u a ja id? do markera to pisze Na stanowisku nie ma ?adnego pojazdu.

http://gtaonline.pl/%3Cfo...dec534cfd02fb38

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-07, 21:16


Mac1neK







Wiek: 31
Na forum: 3874 dni
Posty: 11
Nick w MP: Mac1neK

Piwa: 3

Respekt: 50

Witam Potrzebuje pomocy w podpi?ciu przecho pod mysql i pod m?j system pojazd?w
kto mi pomo?e niech pisze pw daje :piwo: i R*

Pozdrawiam

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-10, 17:40


Quin







Wiek: 25
Na forum: 4537 dni
Posty: 79

Piwa: 3

Respekt: 38

Prosz? o przerobienie skryptu tak aby pojazdy da?o si? przyklei? tylko do leviatana (id 417)

function gluev()

    local outString
    outputDebugString("glue vehicle")
    
    local thePlayer getLocalPlayer()
    local myVehicle getPedOccupiedVehicle(thePlayer)
    if myVehicle then
        local attachMeattachedTo

        outputDebugString("my vehicle")
        local vehicles getElementsByType("vehicle")
        local closestcdist nil100
        local mx,my,mz getElementPosition(myVehicle)
        for k,v in ipairs(vehicles) do
            if isElementStreamedIn(v) and ~= myVehicle then
                local x,y,getElementPosition(v)
                local tmpdist getDistanceBetweenPoints3D(x,y,z,mx,my,mz)
                if tmpdist cdist then
                    cdist tmpdist
                    closest v
                end
            end
        end
        
        outputDebugString("Auto = " .. getVehicleName(closest) .. ", distancia: " .. tonumber(cdist) .. "")
        
        if cdist or cdist == nil then
            return false
        end
        
        local vtype getElementModel(myVehicle)
        if vtype == (417then
            attachMe closest
            attachedTo myVehicle
        else 
            attachMe myVehicle
            attachedTo closest
        end
        
        local pxpypz getElementPosition(attachedTo)
        local vxvyvz getElementPosition(attachMe)
        local sx px vx
        local sy py vy
        local sz pz vz
        
        local rotpXrotpYrotpZ getElementRotation(attachedTo)
        local rotvXrotvYrotvZ getElementRotation(attachMe)
        
        local t math.rad(rotvX)
        local p math.rad(rotvY)
        local f math.rad(rotvZ)
        
        local ct math.cos(t)
        local st math.sin(t)
        local cp math.cos(p)
        local sp math.sin(p)
        local cf math.cos(f)
        local sf math.sin(f)
        
        local z ct*cp*sz + (sf*st*cp cf*sp)*sx + (-cf*st*cp sf*sp)*sy
        local x = -ct*sp*sz + (-sf*st*sp cf*cp)*sx + (cf*st*sp sf*cp)*sy
        local y st*sz sf*ct*sx cf*ct*sy
        
        local rotX rotpX rotvX
        local rotY rotpY rotvY
        local rotZ rotpZ rotvZ        
        
            
        triggerServerEvent("glueVehicle"attachMeattachedTox*-1y*-1z*-1rotXrotYrotZ)
        
        unbindKey("x","down",gluev)
        bindKey("x","down",ungluev)
        

    
    else 
    end 
    
end

addCommandHandler("gluev",gluev)


function ungluev ()
    local player getLocalPlayer()
    local myVehicle getPedOccupiedVehicle(player)
    local vtype getElementModel(myVehicle)
    if vtype == (417then
        local attached getAttachedElements(myVehicle)
        for k,v in ipairs(attached) do
            if getElementType(v) == "vehicle" then
                myVehicle v
            end
        end
    end
    triggerServerEvent("unglueVehicle"myVehicle)
    unbindKey("jump","down",ungluev)
    unbindKey("x","down",ungluev)
    bindKey("x","down",gluev)
end

addCommandHandler("unglue",ungluev)

bindKey("x","down",gluev)




Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-10, 21:57


PremierQ







Wiek: 31
Na forum: 3881 dni
Posty: 29
Nick w MP: PremierQ

Piwa: 4

Respekt: 50

Witam.
Chcia?bym was poprosi? aby?cie zmodyfikowali skrypt Jail System. W pierwotnej postaci tego skryptu jedynie w?a?ciciel mo?e wrzuca? graczy do wi?zienia. Jak ju? si? domy?lacie, chcia?bym aby skrypt pobiera? grup? z ACL o nazwie Policja i aby tylko policja i ew. w?a?ciciel m?g? zarz?dza? wi?zieniem.

Link do skryptu : http://community.multithe...details&id=3251

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-17, 19:25


sukablina







Wiek: 28
Na forum: 3944 dni
Posty: 2
Nick w MP: Toczel



Respekt: 60

Prosze o przerobienie skryptu na suszarke http://www.gtao.pl/%3Cfon...ora-vt99006.htm

jaka funkcje doda? do aby sprawdza?o ostatniego kierowce auta ?
function(element, actionID, actionName)
[.....]
[.....]
[.....]
elseif actionID == 4 then --prawko
// Co tutaj
end

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-17, 20:02


Gerano

Mleko,Kakao,LUA






Wiek: 38
Na forum: 4266 dni
Posty: 187
Nick w MP: Gerano

Piwa: 1460

Respekt: 146,3
Respekt: 146,3

Ostrzeżeń: 100%
sukablina,
function setLastDriver(plrseat)
if seat == 0 then
setElementData(source"ostatni"getPlayerName(plr))
end
end
addEventHandler("onVehicleExit"rootsetLastDriver)

TO jest kod na ostatniego kierowc?.

function(elementactionIDactionName)
[.....]
[.....]
[.....]
elseif actionID == 4 then --prawko 

To jest nie doko?czona funkcja na zabieranie prawka jak samo obok pisz?

Podpis
BUDOWA SERWERA: XXX

Prace: XXX%
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-22, 15:35


teusz11







Wiek: 29
Na forum: 4652 dni
Posty: 191
Nick w MP: Matevsz

Piwa: 4

Respekt: 50

Witam prosi?bym o przerobienie addCommandHandler na addEventHandler za pomoc :piwo:


local function DrzewaSpool()
    for i,v in ipairs(punkty) do
        if math.random(1,4)==1 then
            if not v.obiekt or not isElement(v.obiekt) or getElementType(v.obiekt)~="object" then
                if SadzenieDrzew(v[1],v[2],v[3]-0.5then
                    local oid=DrzewaMale[math.random(1,#DrzewaMale)]
                    v.obiekt=createObject(oidv[1],v[2],v[3]-1.3)
                    setObjectScale(v.obiekt,0.4)
                end
            elseif MaleDrzewa(v.obiektthen
                local skala=getObjectScale(v.obiekt)
                if skala<0.99 then
                    setObjectScale(v.obiekt,skala+0.2)
                else
                    local oid=DrzewaDuze[math.random(1,#DrzewaDuze)]
                    setElementModel(v.obiekt,oid)
                    setElementData(v.obiekt,"tartak:drzewo",true)
                end
            elseif ScieteDrzewa(v.obiektthen
                destroyElement(v.obiekt)
                v.obiekt=nil
            end
        end
    end
end

setTimer(DrzewaSpool120000,0)
setTimer(DrzewaSpool41000,0)
addCommandHandler("drzewaspool"drzewaSpool)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-22, 22:43


Marcinos651







Wiek: 28
Na forum: 4480 dni
Posty: 18
Nick w MP: Marcin651



Respekt: 50

Prosz? bardzo o przerobienie skryptu tak aby po zalogowaniu respilo nas na tych kordach: -1931.59668, 487.33221, 34.30988
A i jesli dacie rade to podczas rejestracji wywala "Error! Prosze wprowadzic nowy login/haslo!"
Jesli zarejstrujemy sie komenda /register mozna sie potem normalnie zalogowac.

Na samym dole wpis z Server.lua

Client-
font1 guiCreateFont ("font.ttf",12)
font2 guiCreateFont ("font.ttf",30)
wdwLogin_Pannel = {}
tabPannel_Main = {}
tab_Login = {}
tab_Register = {}

function open_log_reg_pannel()
if not(isElement(wdwLogin_Pannel)) then
     
    showChat(false)
    
    x,guiGetScreenSize()
    
    local sWidth,sHeight guiGetScreenSize() 
    local Width,Height 550,500
    local X = (sWidth/2) - (Width/2)
    local Y = (sHeight/2) - (Height/2)
    
    
    Image guiCreateStaticImage0019201080"login_bg.png"false )
    guiSetEnabled (Imagefalse)
    
    Login_img guiCreateStaticImageX120612316"login_window.png"false )
    guiSetEnabled (Login_imgfalse)
    
    --!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    shLoginLogo guiCreateLabel08055060""false )
    guiLabelSetColor(shLoginLogo,0,0,0)
    guiSetFont (shLoginLogofont2)
    shLogin guiCreateStaticImage45024910535"login.png"false )
    addEventHandler("onClientGUIClick",shLogin,onClickBtnLogin)
    addEventHandler"onClientMouseEnter",shLogin,LoginSH)
    addEventHandler("onClientMouseLeave",shLogin,SErem)
    
    edit_Login guiCreateEdit(45,202,363,44,"",false)
    guiSetFont (edit_Loginfont1)
    edit_password guiCreateEdit(45,307,363,45,"",false)
    guiSetFont (edit_passwordfont1)
    guiEditSetMaxLength edit_Login,25)
    guiEditSetMaxLength edit_password,25)
    guiEditSetMasked edit_passwordtrue )
    
    
    lbl_about_legth guiCreateLabel(142,70,184,18,"",false)
    guiLabelSetColor(lbl_about_legth,0,0,0)
    guiLabelSetVerticalAlign(lbl_about_legth,"center")
    guiLabelSetHorizontalAlign(lbl_about_legth,"center",false)
    
    checkbox_save guiCreateCheckBox(386,365,150,20,"",false,false)
    guiSetFont(checkbox_save,font1)
    
    
    
    login_tab_error_msg guiCreateLabel(X,400,450,31,"Error_login_tab",false)
    guiLabelSetColor(login_tab_error_msg,0,0,0)
    guiLabelSetVerticalAlign(login_tab_error_msg,"center")
    guiLabelSetHorizontalAlign(login_tab_error_msg,"center",false)
    guiSetFont(login_tab_error_msg,font1)

        
    --!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!    -- A gomb
    addEventHandler("onClientGUIClick",shGuest,onClickGuest)
    addEventHandler"onClientMouseEnter",shGuest,GuestSH)
    addEventHandler("onClientMouseLeave",shGuest,SErem)
    
    lbl_reg_top_info guiCreateLabel(80,290,45,255,"",false)
    guiLabelSetColor(lbl_reg_top_info,0,0,0)
    guiLabelSetVerticalAlign(lbl_reg_top_info,"center")
    guiLabelSetHorizontalAlign(lbl_reg_top_info,"center",false)
    guiSetVisible(lbl_reg_top_info,false)
    
    edit_account_name guiCreateEdit(38,184,363,46,"",false)
    guiEditSetMaxLength edit_account_name,25)
    guiSetVisible(edit_account_name,false)
    guiSetFont (edit_account_namefont1)
    
    edit__reg_tab_password guiCreateEdit(38,275,363,46,"",false)
    guiEditSetMaxLength edit__reg_tab_password,25)
    guiEditSetMasked edit__reg_tab_passwordtrue )
    guiSetVisible(edit__reg_tab_password,false)
    guiSetFont (edit__reg_tab_passwordfont1)
    
    
    edit__reg_tab_Repassword guiCreateEdit(38,361,363,46,"",false)
    guiSetFont (edit__reg_tab_Repasswordfont1)
    guiEditSetMaxLength edit__reg_tab_Repassword,25)
    guiEditSetMasked edit__reg_tab_Repasswordtrue )
    guiSetVisible(edit__reg_tab_Repassword,false)
    guiSetEnabled (edit__reg_tab_Repasswordtrue)  
    
    --!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    shRegister guiCreateStaticImage45028010535"register.png"false )
    addEventHandler("onClientGUIClick",shRegister,OnBtnRegister)
    addEventHandler"onClientMouseEnter",shRegister,RegisterSH)
    addEventHandler("onClientMouseLeave",shRegister,SErem)
    
    --!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    shRegister2 guiCreateStaticImage45035010535"register2.png"false )
    addEventHandler("onClientGUIClick",shRegister2,onClickBtnRegister)
    addEventHandler"onClientMouseEnter",shRegister2,Register2SH)
    addEventHandler("onClientMouseLeave",shRegister2,SErem)
    
    guiSetVisible(shRegister2,false)
    
    reg_tab_error_msg guiCreateLabel(X,400,450,31,"Error_reg_ttab",false)
    guiLabelSetColor(reg_tab_error_msg,0,0,0)
    guiLabelSetVerticalAlign(reg_tab_error_msg,"center")
    guiLabelSetHorizontalAlign(reg_tab_error_msg,"center",false)
    guiSetFont(reg_tab_error_msg,font1)
    

    showCursor(true)

    guiSetText(reg_tab_error_msg"")
    guiSetText(login_tab_error_msg"")
    
    
    local usernamepassword loadLoginFromXML()
    
    if notusername == "" or password == ""then
        guiCheckBoxSetSelected checkbox_savetrue )
        guiSetText edit_Logintostring(username))
        guiSetText edit_passwordtostring(password))
    else
        guiCheckBoxSetSelected checkbox_savefalse )
        guiSetText edit_Logintostring(username))
        guiSetText edit_passwordtostring(password))
    end
    end
    
end

function LoginSH ()
    guiStaticImageLoadImage(shLogin"sh.png" )
end

function RegisterSH ()
    guiStaticImageLoadImage(shRegister"shr.png" )
end

function Register2SH ()
    guiStaticImageLoadImage(shRegister2"shr2.png" )
end

function GuestSH ()
    guiStaticImageLoadImage(shGuest"shg.png" )
end

function SErem ()
guiStaticImageLoadImage(shLogin"login.png" )
guiStaticImageLoadImage(shRegister"register.png" )
guiStaticImageLoadImage(shRegister2"register2.png" )
end

function start_cl_resource()
    open_log_reg_pannel()
end
addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),start_cl_resource)


function loadLoginFromXML()
    local xml_save_log_File xmlLoadFile ("files/xml/userdata.xml")
    if not xml_save_log_File then
        xml_save_log_File xmlCreateFile("files/xml/userdata.xml""login")
    end
    local usernameNode xmlFindChild (xml_save_log_File"username"0)
    local passwordNode xmlFindChild (xml_save_log_File"password"0)
    if usernameNode and passwordNode then
        return xmlNodeGetValue(usernameNode), xmlNodeGetValue(passwordNode)
    else
        return """"
    end
    xmlUnloadFile xml_save_log_File )
end
 
 
function saveLoginToXML(usernamepassword)
    local xml_save_log_File xmlLoadFile ("files/xml/userdata.xml")
    if not xml_save_log_File then
        xml_save_log_File xmlCreateFile("files/xml/userdata.xml""login")
    end
    if (username ~= ""then
        local usernameNode xmlFindChild (xml_save_log_File"username"0)
        if not usernameNode then
            usernameNode xmlCreateChild(xml_save_log_File"username")
        end
        xmlNodeSetValue (usernameNodetostring(username))
    end
    if (password ~= ""then
        local passwordNode xmlFindChild (xml_save_log_File"password"0)
        if not passwordNode then
            passwordNode xmlCreateChild(xml_save_log_File"password")
        end     
        xmlNodeSetValue (passwordNodetostring(password))
    end
    xmlSaveFile(xml_save_log_File)
    xmlUnloadFile (xml_save_log_File)
end
addEvent("saveLoginToXML"true)
addEventHandler("saveLoginToXML"getRootElement(), saveLoginToXML)



function resetSaveXML()
        local xml_save_log_File xmlLoadFile ("files/xml/userdata.xml")
        if not xml_save_log_File then
            xml_save_log_File xmlCreateFile("files/xml/userdata.xml""login")
        end
        if (username ~= ""then
            local usernameNode xmlFindChild (xml_save_log_File"username"0)
            if not usernameNode then
                usernameNode xmlCreateChild(xml_save_log_File"username")
            end
        end
        if (password ~= ""then
            local passwordNode xmlFindChild (xml_save_log_File"password"0)
            if not passwordNode then
                passwordNode xmlCreateChild(xml_save_log_File"password")
            end     
            xmlNodeSetValue (passwordNode"")
        end
        xmlSaveFile(xml_save_log_File)
        xmlUnloadFile (xml_save_log_File)
end
addEvent("resetSaveXML"true)
addEventHandler("resetSaveXML"getRootElement(), resetSaveXML)

function onClickBtnLogin(button,state)
    
    showChat(true)
    showCursor(false)
    guiSetVisible(Image,false)
        guiSetVisible(shGuestfalse)
        guiSetVisible(Imagefalse)
        guiSetVisible(shLoginfalse)
        guiSetVisible(shRegisterfalse)
        guiSetVisible(edit_passwordfalse)
        guiSetVisible(edit_Loginfalse)
        guiSetVisible(checkbox_savefalse)
        guiSetVisible(Login_imgfalse)
        guiSetVisible(shLoginLogofalse)
    
    
    if(button == "left" and state == "up"then
        if (source == shLoginthen
            username guiGetText(edit_Login)
            password guiGetText(edit_password)
                if guiCheckBoxGetSelected checkbox_save ) == true then
                    checksave true
                else
                    checksave false
                end
            triggerServerEvent("onRequestLogin",getLocalPlayer(),username,password,checksave)
        end
    end
end

function OnBtnRegister ()
    guiStaticImageLoadImage(Login_img"register_window.png" )
    guiSetVisible(shRegister2true)
    guiSetVisible(lbl_reg_top_info,true)
    guiSetVisible(edit__reg_tab_Repassword,true)
    guiSetEnabled (edit__reg_tab_Repasswordtrue)
    guiSetVisible(edit__reg_tab_password,true)
    guiSetVisible(edit_account_name,true)
       guiSetVisible(shGuestfalse)
        guiSetVisible(shLoginfalse)
        guiSetVisible(shRegisterfalse)
        guiSetVisible(edit_passwordfalse)
        guiSetVisible(edit_Loginfalse)
        guiSetVisible(checkbox_savefalse)
        guiSetVisible(shLoginLogofalse)
end

function onClickBtnRegister(button,state)
    
    
    guiStaticImageLoadImage(Login_img"Login_window.png" )
     
        guiSetVisible(shGuesttrue)
        guiSetVisible(shLogintrue)
        guiSetVisible(shRegistertrue)
        guiSetVisible(edit_passwordtrue)
        guiSetVisible(edit_Logintrue)
        guiSetVisible(checkbox_savetrue)
        guiSetVisible(shRegister2false)
        guiSetVisible(edit__reg_tab_passwordfalse)
        guiSetVisible(edit__reg_tab_Repasswordfalse)
        guiSetVisible(edit_account_namefalse)
        guiSetVisible(lbl_reg_top_infofalse)
         guiSetVisible(shLoginLogotrue)
        showCursor(true)
    
    --
            username guiGetText(edit_account_name)
            password guiGetText(edit__reg_tab_password)
            passwordConfirm guiGetText(edit__reg_tab_Repassword)
            triggerServerEvent("onRequestRegister",getLocalPlayer(),username,password,passwordConfirm)
            
            guiSetText(reg_tab_error_msg"Udalo sie. Teraz sie zaloguj!")
            guiLabelSetColor reg_tab_error_msg00)
            setTimer(function() guiSetText(reg_tab_error_msg""end,3000,1)
            setTimer(function() guiLabelSetColor reg_tab_error_msg00end,3000,1)
            
end



function Error_msg(TabText)
showCursor(true)
    if Tab == "Login" then 
    
        guiSetVisible(btnGuesttrue)
        guiSetVisible(shGuesttrue)
        guiSetVisible(Imagetrue)
        guiSetVisible(shLogintrue)
        guiSetVisible(shRegistertrue)
        guiSetVisible(btn_reg_tab_registertrue)
        guiSetVisible(edit_passwordtrue)
        guiSetVisible(edit_Logintrue)
        guiSetVisible(checkbox_savetrue)
        guiSetVisible(Login_imgtrue)
        guiSetVisible(shLoginLogotrue)
    
        guiSetText(login_tab_error_msgtostring(Text))
        setTimer(function() guiSetText(login_tab_error_msg""end,3000,1)
    elseif Tab == "Register" then
        guiSetText(reg_tab_error_msgtostring(Text))
        setTimer(function() guiSetText(reg_tab_error_msg""end,3000,1)
    end
end
addEvent("set_warning_text",true)
addEventHandler("set_warning_text",getRootElement(),Error_msg)


function onClickGuest()
    
    showChat(true)
    
    guiSetVisible(Image,false)
        guiSetVisible(shGuestfalse)
        guiSetVisible(Imagefalse)
        guiSetVisible(shLoginfalse)
        guiSetVisible(shRegisterfalse)
        guiSetVisible(edit_passwordfalse)
        guiSetVisible(edit_Loginfalse)
        guiSetVisible(checkbox_savefalse)
        guiSetVisible(Login_imgfalse)
        guiSetVisible(shLoginLogofalse)
            showCursor(false)
end

function hideLoginWindow()
    
    showCursor(false)
    showChat(true)
    removeEventHandler("onClientGUIClick",shLogin,onClickBtnLogin)
end
addEvent("hideLoginWindow"true)
addEventHandler("hideLoginWindow"getRootElement(), hideLoginWindow)

function CursorError ()
outputChatBox("Cursor Error!")
showCursor(false)
end
addCommandHandler("showc"CursorError)


fileDelete("client.lua")



Server


function PlayerLogin(username,password,checksave)
    if not (username == ""then
        if not (password == ""then
            local account getAccount usernamepassword )
            if ( account ~= false then
                logIn(sourceaccountpassword)

                triggerClientEvent (source,"hideLoginWindow",getRootElement())
                
                    if checksave == true then
                        triggerClientEvent(source,"saveLoginToXML",getRootElement(),username,password)
                    else
                        triggerClientEvent(source,"resetSaveXML",getRootElement(),username,password)
                    end
                
            else
                triggerClientEvent(source,"set_warning_text",getRootElement(),"Login","Zly login lub haslo!")
            end
        else
            triggerClientEvent(source,"set_warning_text",getRootElement(),"Login","Wpisz haslo!")
        end
    else
        triggerClientEvent(source,"set_warning_text",getRootElement(),"Login","Wpisz login!")
    end
end
addEvent("onRequestLogin",true)
addEventHandler("onRequestLogin",getRootElement(),PlayerLogin)



function registerPlayer(username,password,passwordConfirm)
    if not (username == ""then
        if not (password == ""then
            if not (passwordConfirm == ""then
                if password == passwordConfirm then
                    local account getAccount (username,password)
                    if (account == falsethen
                        local accountAdded addAccount(tostring(username),tostring(password))
                        if (accountAddedthen
                            outputChatBox ("" .. username .. " #00FF00| Password: #FFFFFF" .. password .. "#00FF00 ]",source,255,255,255,true )
                            outputChatBox ("",source,255,255,255,true )
                        else
                            triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","Error! Prosze wprowad? nowy login/haslo!")
                        end
                    else
                        triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","Ten login jest juz zajety!")
                    end
                else
                    triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","Hasla sie nie zgadzaja!")
                end
            else
                triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","Prosze wpisz w dwie kolumny haslo!")
            end
        else
            triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","Wpisz swoje haslo!")
        end
    else
        triggerClientEvent(source,"set_warning_text",getRootElement(),"Register","Wpisz swoj login!")
    end
end
addEvent("onRequestRegister",true)
addEventHandler("onRequestRegister",getRootElement(),registerPlayer)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-27, 23:53


demoniskoxd







Wiek: 30
Na forum: 3989 dni
Posty: 79
Nick w MP: Francesco

Piwa: 1

Respekt: 50

Mam pytanko,dlaczego to nie chce dzia?a? ?
Kod:

createMarker ( -1916.67,875.30,34.41 , "cylinder", 1.5, 255, 255, 255, 170 )
addEventHandler ( "onMarkerHit", marker, hehe)
addCommandHandler( 'random_color',
function( uPlayer )
if isPedInVehicle( uPlayer ) then
local uVehicle = getPedOccupiedVehicle( uPlayer )
if uVehicle then
local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 )
setVehicleColor( uVehicle, r, g, b )
end
end
end
)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-28, 00:22


cinek339







Wiek: 35
Na forum: 4479 dni
Posty: 14



Respekt: 50

Witam mam pro?b? mo?e mi kto? przerobi? m?j skrypt chcem ?eby panel m?g? si? otwiera? tylko wtedy gdy dana osoba jest w poje?dzie.

Kod:

function wlacz1 ()
if (guiGetVisible(Okno) == false) then
showCursor(true)
guiSetVisible(gui10, true)
guiSetVisible(Okno, true )
end
end
bindKey ("l","down",wlacz1)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-28, 02:05


Prezes.







Wiek: 27
Na forum: 4370 dni
Posty: 75
Nick w MP: Prezes.

Piwa: 17

Respekt: 60

"demoniskoxd" napisał/a:

Mam pytanko,dlaczego to nie chce dzia?a? ?
Kod:

createMarker ( -1916.67,875.30,34.41 , "cylinder", 1.5, 255, 255, 255, 170 )
addEventHandler ( "onMarkerHit", marker, hehe)
addCommandHandler( 'random_color',
function( uPlayer )
if isPedInVehicle( uPlayer ) then
local uVehicle = getPedOccupiedVehicle( uPlayer )
if uVehicle then
local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 )
setVehicleColor( uVehicle, r, g, b )
end
end
end
)


SERIO?! Tak trudno jest wej?? w to:

Więcej informacji znajdziesz w Wikipedii MTA:

onMarkerHit


Podstawi? sw?j kod i tyle? No ale dobra, masz:


local kolorPojazdu createMarker 0,0,"cylinder"3255255255170 ) 

function wejscieMarker(hitElementmatchingDimension) 
    if (matchingDimensionthen
     if isPedInVehiclehitElement then  
    local uVehicle getPedOccupiedVehiclehitElement ) 
        if uVehicle then 
        local rgmath.random255 ), math.random255 ), math.random255 ) 
        setVehicleColoruVehiclergend
end
end
end

addEventHandler "onMarkerHit"kolorPojazduwejscieMarker


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-29, 21:01


Bakomaisty







Wiek: 18
Na forum: 3815 dni
Posty: 11



Respekt: 50

Co oznacza ten kawa?ek skryptu.
tocolor(0, 0, 0, 145), false)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-30, 10:52


#404







Wiek: 26
Na forum: 4771 dni
Posty: 1438

Piwa: 2512

Respekt: 833,5
Respekt: 833,5Respekt: 833,5

Ostrzeżeń: 60%
Bakomaisty, kolor, wyra?ony jako czerwony, zielony, niebieski, alpha czyli prze?roczysto??. Warto?ci od 0 do 255.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-01, 14:15


Toporek







Wiek: 41
Na forum: 3976 dni
Posty: 37
Nick w MP: spejson

Piwa: 1

Respekt: 50

do skasowania

Postaw piwo autorowi tego posta
 

 
Tagi: prośby :: przerobienie :: skryptu
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Zasoby do MTA » PROŚBY O PRZEROBIENIE SKRYPTU Odpowiedz do tematu

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