Jump to content

Entercar


William147

Recommended Posts

Hi

I would like to make a command, which teleport player to car if this is own.

I have some script but i cant make it to one script.

/stats command which give some informations of character(about cars).

  
local stats = nil
 
 
 
function statsTable()
 
    if (stats == nil) then
 
        guiSetInputEnabled(true)
 
        local sx,sy = guiGetScreenSize ()
 
        local width = 440
 
        local height = 397
 
        local stats = guiCreateWindow (sx/2-width/2,sy/2-height/2,width,height,"Karakter Statisztikák",false)
 
        local Bezaras = guiCreateButton (10,height-30,width-20,22,"Bezárás",false,stats)
 
        local lista = guiCreateGridList (10,25,width-20,height-50,false,stats)
 
        local d3 = guiGridListAddColumn (lista,"Adat",0.35)
 
        local d2 = guiGridListAddColumn (lista,"Érték",0.35)
 
        guiWindowSetSizable ( stats, false )
 
        guiWindowSetMovable ( stats, false )
 
       
 
                for i = 1, 21 do
 
                 guiGridListAddRow(lista)
 
                end
 
 
 
                local carlicense = getElementData(getLocalPlayer(), "license.car")
 
                local gunlicense = getElementData(getLocalPlayer(), "license.gun")
 
                local telefonszam = getElementData(getLocalPlayer(), "cellnumber")
 
                local hoursplayed = getElementData(getLocalPlayer(), "hoursplayed")
 
                local factionleader = getElementData(getLocalPlayer(), "factionleader")
 
                local account = getElementData(getLocalPlayer(), "gameaccountid")   
 
                local playerid = getElementData(getLocalPlayer(), "playerid")
 
                local theTeam = getTeamName(getPlayerTeam(getLocalPlayer()))
 
                local dbid = getElementData(getLocalPlayer(), "dbid")
 
                local playerName = getPlayerName(getLocalPlayer())
 
                local money = getElementData(getLocalPlayer(), "money")
 
                local bankmoney = getElementData(getLocalPlayer(), "bankmoney")
 
                local adminnev = getElementData(getLocalPlayer(), "anick") or getPlayerName(getLocalPlayer())
 
                local adminlevel = getElementData(getLocalPlayer(), "adminlevel")
 
                local adminrank = exports.rs_core:getPlayerAdminTitle(getLocalPlayer())
 
                local szint = exports.rs_core:getLevel(getLocalPlayer())
 
                local points = getElementData(getLocalPlayer(), "points")
 
                local carids = ""
 
                local numcars = 0
 
                    for key, value in ipairs(getElementsByType ( "vehicle" )) do
 
                        local owner = tonumber(getElementData(value, "owner"))
 
                        if (owner) and (owner==dbid) then
 
                            local id = getElementData(value, "dbid")
 
                            carids = "".. carids .. id .. " | "
 
                            numcars = numcars + 1
 
                        end
 
                    end
 
                numcars = numcars .. "/" .. getElementData(getLocalPlayer(), "maxvehicles")
 
                if (carids=="") then carids = "Nincs.  " end
 
 
 
                local properties = ""
 
                local numproperties = 0
 
                    for key, value in ipairs(getElementsByType("pickup", getResourceRootElement(getResourceFromName("rs_interior")))) do
 
                        local owner = tonumber(getElementData(value, "owner"))
 
                    if owner and owner == dbid and getElementData(value, "name") then
 
                        local id = getElementData(value, "dbid")
 
                        properties = ""..properties .. id .. " | "
 
                        numproperties = numproperties + 1
 
                    end
 
                end
 
                if (properties=="") then properties = "Nincs.  " end
 
 
 
                if (carlicense==1) then
 
                    carlicense = "Van"
 
                else
 
                    carlicense = "Nincs"
 
                end
 
 
 
                if (gunlicense==1) then
 
                    gunlicense = "Van"
 
                else
 
                    gunlicense = "Nincs"
 
                end
 
 
 
                if (factionleader==1) then
 
                    factionleader = "Igen"
 
                else
 
                    factionleader = "Nem"
 
                end
 
 
 
                if (adminlevel > 0) then
 
                    admin = "Igen"
 
                else
 
                    admin = "Nem"
 
                end
 
 
 
                guiGridListSetItemText ( lista, 0, 1, "Telefonszám", false, false )
 
                guiGridListSetItemText ( lista, 0, 2, telefonszam, false, false )
 
                guiGridListSetItemText ( lista, 1, 1, "Járművek", false, false )
 
                guiGridListSetItemText ( lista, 1, 2, carids, false, false )
 
                guiGridListSetItemText ( lista, 2, 1, "Ingatlanok", false, false )
 
                guiGridListSetItemText ( lista, 2, 2, properties, false, false )
 
                guiGridListSetItemText ( lista, 3, 1, "Jogosítvány", false, false )
 
                guiGridListSetItemText ( lista, 3, 2, carlicense, false, false )
 
                guiGridListSetItemText ( lista, 4, 1, "Fegyverengedély", false, false )
 
                guiGridListSetItemText ( lista, 4, 2, gunlicense, false, false )
 
                guiGridListSetItemText ( lista, 5, 1, "Játszott órák", false, false )
 
                guiGridListSetItemText ( lista, 5, 2, hoursplayed, false, false )
 
                guiGridListSetItemText ( lista, 6, 1, "Frakció", false, false )
 
                guiGridListSetItemText ( lista, 6, 2, theTeam, false, false )
 
                guiGridListSetItemText ( lista, 7, 1, "Frakció Leader", false, false )
 
                guiGridListSetItemText ( lista, 7, 2, factionleader, false, false )
 
                guiGridListSetItemText ( lista, 8, 1, "AccountID", false, false )
 
                guiGridListSetItemText ( lista, 8, 2, account, false, false )
 
                guiGridListSetItemText ( lista, 9, 1, "Jelenlegi JátékosID", false, false )
 
                guiGridListSetItemText ( lista, 9, 2, playerid, false, false )
 
                guiGridListSetItemText ( lista, 10, 1, "Karakternév", false, false )
 
                guiGridListSetItemText ( lista, 10, 2, playerName, false, false )
 
                guiGridListSetItemText ( lista, 11, 1, "Készpénz", false, false )
 
                guiGridListSetItemText ( lista, 11, 2, money, false, false )
 
                guiGridListSetItemText ( lista, 12, 1, "Bankszámla", false, false )
 
                guiGridListSetItemText ( lista, 12, 2, bankmoney, false, false )
 
                guiGridListSetItemText ( lista, 13, 1, "Járműslot", false, false )
 
                guiGridListSetItemText ( lista, 13, 2, numcars, false, false )
 
                guiGridListSetItemText ( lista, 14, 1, "UID", false, false )
 
                guiGridListSetItemText ( lista, 14, 2, dbid, false, false )
 
                guiGridListSetItemText ( lista, 15, 1, "Admin", false, false )
 
                guiGridListSetItemText ( lista, 15, 2, admin, false, false )
 
                guiGridListSetItemText ( lista, 18, 1, "Pontok", false, false )
 
                guiGridListSetItemText ( lista, 18, 2, points, false, false )
 
                guiGridListSetItemText ( lista, 19, 1, "Szint", false, false )
 
                guiGridListSetItemText ( lista, 19, 2, szint, false, false )
 
            if (adminlevel > 0) then
 
                guiGridListSetItemText ( lista, 16, 1, "Adminnév", false, false )
 
                guiGridListSetItemText ( lista, 16, 2, adminnev, false, false )
 
               
Link to comment
Hi

I would like to make a command, which teleport player to car if this is own.

I have some script but i cant make it to one script.

/stats command which give some informations of character(about cars).

  
local stats = nil
 
 
 
function statsTable()
 
    if (stats == nil) then
 
        guiSetInputEnabled(true)
 
        local sx,sy = guiGetScreenSize ()
 
        local width = 440
 
        local height = 397
 
        local stats = guiCreateWindow (sx/2-width/2,sy/2-height/2,width,height,"Karakter Statisztikák",false)
 
        local Bezaras = guiCreateButton (10,height-30,width-20,22,"Bezárás",false,stats)
 
        local lista = guiCreateGridList (10,25,width-20,height-50,false,stats)
 
        local d3 = guiGridListAddColumn (lista,"Adat",0.35)
 
        local d2 = guiGridListAddColumn (lista,"Érték",0.35)
 
        guiWindowSetSizable ( stats, false )
 
        guiWindowSetMovable ( stats, false )
 
       
 
                for i = 1, 21 do
 
                 guiGridListAddRow(lista)
 
                end
 
 
 
                local carlicense = getElementData(getLocalPlayer(), "license.car")
 
                local gunlicense = getElementData(getLocalPlayer(), "license.gun")
 
                local telefonszam = getElementData(getLocalPlayer(), "cellnumber")
 
                local hoursplayed = getElementData(getLocalPlayer(), "hoursplayed")
 
                local factionleader = getElementData(getLocalPlayer(), "factionleader")
 
                local account = getElementData(getLocalPlayer(), "gameaccountid")   
 
                local playerid = getElementData(getLocalPlayer(), "playerid")
 
                local theTeam = getTeamName(getPlayerTeam(getLocalPlayer()))
 
                local dbid = getElementData(getLocalPlayer(), "dbid")
 
                local playerName = getPlayerName(getLocalPlayer())
 
                local money = getElementData(getLocalPlayer(), "money")
 
                local bankmoney = getElementData(getLocalPlayer(), "bankmoney")
 
                local adminnev = getElementData(getLocalPlayer(), "anick") or getPlayerName(getLocalPlayer())
 
                local adminlevel = getElementData(getLocalPlayer(), "adminlevel")
 
                local adminrank = exports.rs_core:getPlayerAdminTitle(getLocalPlayer())
 
                local szint = exports.rs_core:getLevel(getLocalPlayer())
 
                local points = getElementData(getLocalPlayer(), "points")
 
                local carids = ""
 
                local numcars = 0
 
                    for key, value in ipairs(getElementsByType ( "vehicle" )) do
 
                        local owner = tonumber(getElementData(value, "owner"))
 
                        if (owner) and (owner==dbid) then
 
                            local id = getElementData(value, "dbid")
 
                            carids = "".. carids .. id .. " | "
 
                            numcars = numcars + 1
 
                        end
 
                    end
 
                numcars = numcars .. "/" .. getElementData(getLocalPlayer(), "maxvehicles")
 
                if (carids=="") then carids = "Nincs.  " end
 
 
 
                local properties = ""
 
                local numproperties = 0
 
                    for key, value in ipairs(getElementsByType("pickup", getResourceRootElement(getResourceFromName("rs_interior")))) do
 
                        local owner = tonumber(getElementData(value, "owner"))
 
                    if owner and owner == dbid and getElementData(value, "name") then
 
                        local id = getElementData(value, "dbid")
 
                        properties = ""..properties .. id .. " | "
 
                        numproperties = numproperties + 1
 
                    end
 
                end
 
                if (properties=="") then properties = "Nincs.  " end
 
 
 
                if (carlicense==1) then
 
                    carlicense = "Van"
 
                else
 
                    carlicense = "Nincs"
 
                end
 
 
 
                if (gunlicense==1) then
 
                    gunlicense = "Van"
 
                else
 
                    gunlicense = "Nincs"
 
                end
 
 
 
                if (factionleader==1) then
 
                    factionleader = "Igen"
 
                else
 
                    factionleader = "Nem"
 
                end
 
 
 
                if (adminlevel > 0) then
 
                    admin = "Igen"
 
                else
 
                    admin = "Nem"
 
                end
 
 
 
                guiGridListSetItemText ( lista, 0, 1, "Telefonszám", false, false )
 
                guiGridListSetItemText ( lista, 0, 2, telefonszam, false, false )
 
                guiGridListSetItemText ( lista, 1, 1, "Járművek", false, false )
 
                guiGridListSetItemText ( lista, 1, 2, carids, false, false )
 
                guiGridListSetItemText ( lista, 2, 1, "Ingatlanok", false, false )
 
                guiGridListSetItemText ( lista, 2, 2, properties, false, false )
 
                guiGridListSetItemText ( lista, 3, 1, "Jogosítvány", false, false )
 
                guiGridListSetItemText ( lista, 3, 2, carlicense, false, false )
 
                guiGridListSetItemText ( lista, 4, 1, "Fegyverengedély", false, false )
 
                guiGridListSetItemText ( lista, 4, 2, gunlicense, false, false )
 
                guiGridListSetItemText ( lista, 5, 1, "Játszott órák", false, false )
 
                guiGridListSetItemText ( lista, 5, 2, hoursplayed, false, false )
 
                guiGridListSetItemText ( lista, 6, 1, "Frakció", false, false )
 
                guiGridListSetItemText ( lista, 6, 2, theTeam, false, false )
 
                guiGridListSetItemText ( lista, 7, 1, "Frakció Leader", false, false )
 
                guiGridListSetItemText ( lista, 7, 2, factionleader, false, false )
 
                guiGridListSetItemText ( lista, 8, 1, "AccountID", false, false )
 
                guiGridListSetItemText ( lista, 8, 2, account, false, false )
 
                guiGridListSetItemText ( lista, 9, 1, "Jelenlegi JátékosID", false, false )
 
                guiGridListSetItemText ( lista, 9, 2, playerid, false, false )
 
                guiGridListSetItemText ( lista, 10, 1, "Karakternév", false, false )
 
                guiGridListSetItemText ( lista, 10, 2, playerName, false, false )
 
                guiGridListSetItemText ( lista, 11, 1, "Készpénz", false, false )
 
                guiGridListSetItemText ( lista, 11, 2, money, false, false )
 
                guiGridListSetItemText ( lista, 12, 1, "Bankszámla", false, false )
 
                guiGridListSetItemText ( lista, 12, 2, bankmoney, false, false )
 
                guiGridListSetItemText ( lista, 13, 1, "Járműslot", false, false )
 
                guiGridListSetItemText ( lista, 13, 2, numcars, false, false )
 
                guiGridListSetItemText ( lista, 14, 1, "UID", false, false )
 
                guiGridListSetItemText ( lista, 14, 2, dbid, false, false )
 
                guiGridListSetItemText ( lista, 15, 1, "Admin", false, false )
 
                guiGridListSetItemText ( lista, 15, 2, admin, false, false )
 
                guiGridListSetItemText ( lista, 18, 1, "Pontok", false, false )
 
                guiGridListSetItemText ( lista, 18, 2, points, false, false )
 
                guiGridListSetItemText ( lista, 19, 1, "Szint", false, false )
 
                guiGridListSetItemText ( lista, 19, 2, szint, false, false )
 
            if (adminlevel > 0) then
 
                guiGridListSetItemText ( lista, 16, 1, "Adminnév", false, false )
 
               
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...