Jump to content

I need help ?


Recommended Posts

mysql = exports.mysql

local getPlayerName_ = getPlayerName

getPlayerName = function( ... )

s = getPlayerName_( ... )

return s and s:gsub( "_", " " ) or s

end

--/MINFO

function adminUncuff(thePlayer, commandName, targetPlayer)

if (exports.global:isPlayerAdmin(thePlayer)) then

if not (targetPlayer) then

outputChatBox("SYNTAX: /" .. commandName .. " [info Text]", thePlayer, 255, 194, 14)

end

addCommandHandler("minfo", adminminfo, false, false)

(Alright I dont know what to do from here :/)

Link to comment
wtf :lol:

try this

local x,y,z = getElementPosition( source ) 
  
addCommandHandler( "info", 
function (thePlayer, commandName, id) 
    if (tonumber(id)) then 
    createObject(id, y, x, z - 1) 
    end 
end 
)    

source is not defined .

Thanks for warn, but are the rest right?

local x,y,z = getElementPosition( thePlayer ) 
  
addCommandHandler( "info", 
function (thePlayer, commandName, id) 
    if getElementType(thePlayer) == "player" then 
        if (tonumber(id)) then 
        createObject(id, y, x, z - 1) 
        end 
    end 
end 
)    

Link to comment
wtf :lol:

try this

local x,y,z = getElementPosition( source ) 
  
addCommandHandler( "info", 
function (thePlayer, commandName, id) 
    if (tonumber(id)) then 
    createObject(id, y, x, z - 1) 
    end 
end 
)    

source is not defined .

Thanks for warn, but are the rest right?

local x,y,z = getElementPosition( thePlayer ) 
  
addCommandHandler( "info", 
function (thePlayer, commandName, id) 
    if getElementType(thePlayer) == "player" then 
        if (tonumber(id)) then 
        createObject(id, y, x, z - 1) 
        end 
    end 
end 
)    

No it's not .

Link to comment
  • 2 weeks later...

Whats wrong with this?

  
function createinfop(thePlayer, commandName, id) 
    if not dep then 
        outputChatBox("SYNTAX: /" .. commandName .. " [TEXT]", thePlayer, 255, 194, 14) 
    else 
        if (exports.global:isPlayerLeadAdmin(thePlayer)) or exports.global:isPlayerScripter(thePlayer) then 
            local dimension = getElementDimension(thePlayer) 
            local interior = getElementInterior(thePlayer) 
            local x, y, z  = getElementPosition(thePlayer) 
            local rotation = getPedRotation(thePlayer) 
            local id = tonumber(id) 
             
            z = z - 0.3 
             
            local id = mysql:query_insert_free("INSERT INTO infopoints SET x='" .. mysql:escape_string(x) .. "', y='" .. mysql:escape_string(y) .. "', z='" .. mysql:escape_string(z) .. "', dimension='" .. mysql:escape_string(dimension) .. "', interior='" .. mysql:escape_string(interior) .. "', rotation='" .. mysql:escape_string(rotation) .. "', `id`='" .. mysql:escape_string(limit) .."'") 
                     
            local x,y,z = getElementPosition( source ) 
  
    addCommandHandler( "info", 
    function (thePlayer, commandName, id) 
    if (tonumber(id)) then 
    createObject(id, y, x, z - 1) 
    end 
    end 
    ) 
  

Link to comment

Things that's wrong or unknown to us:

  • Variable "dep" isn't defined (Line 2)
  • Variable "id" is already defined you can't localize it (Line 11 and Line 14)
  • "source" isn't defined (Line 16)
  • "id" needs to be converted into a number (Line 19)

BTW, What are you trying to do in this script?

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...