Jump to content

4: call: falied to call gang_system:getGangData[string"?"]


Recommended Posts

Hi i'm tring to get gang color from castillo gang resource.

function text123() 
    local gang = exports["gang_system"]:getPlayerGang(getLocalPlayer()) 
    if gang ~= "None" then 
        local color = exports["gang_system"]:getGangData(gang,'color') 
        if ( type ( color ) == "table" ) then 
            outputChatBox("test",color[1],color[2],color[3]) 
        end 
    end 
end 
addCommandHandler("one",text123) 

    function="getGangData" type="server" /> -- Arguments: gangName, dataName (leader, bank, motd, color, tag, members, createdOn, logs (table), ranks(table)). Returns: The data. --> 
function="getPlayerGang" type="shared" /> -- Arguments: thePlayer. Returns: The gang name, 'None' otherwise. --> 

Functions are exported in meta.xml(from gang_system).What is the problem ?

Thanks in advance ! :)

Link to comment
function="getGangData" type="server" /> 

server side function not client side. try the same code server side.

function text123(player) 
    local gang = exports["gang_system"]:getPlayerGang(player) 
    if gang ~= "None" then 
        local color = exports["gang_system"]:getGangData(gang,'color') 
        if ( type ( color ) == "table" ) then 
            outputChatBox("test",player,color[1],color[2],color[3]) 
        end 
    end 
end 
addCommandHandler("one",text123) 

BTW i don't know nothing about this group system

Edited by Guest
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...