Jump to content

getPlayerGang - Group System


xXMADEXx

Recommended Posts

Im making vehicle spawners, but for some reason getting the gang is failing... I don't know why.

Error:

ERROR: call: failed to call "[ROG]Groups:getPlayerGang" [string "?"] 

Code:

    addEventHandler("onMarkerHit",marker, 
        function (p) 
            local getGang = exports['[ROG]Groups']:getPlayerGang(p) 
            if (getGang==group) then 
                triggerClientEvent(p,"showGroupVehicleSpawners",p,cars) 
            else 
                triggerClientEvent(p,"message:centerText",p,"Your not in "..group, 3, 255, 0, 0) 
            end 
        end 
    ) 
  
-- This is what i use to create the spawner: 
addGroupSpawner({1319.1091308594, -2584.6645507813, 13.5390625, -90}, {411, 412}, {120, 0, 255}, "Military") 

Link to comment
triggerClientEvent(p,"message:centerText",p,"Your not in "..group, 3, 255, 0, 0)

..group should be ..group..

Not really, because there is a comma ( , ) at the end of ..group, if there would be other quotation, for example:

"Your not in "..group.."so you can't use this command.", 3, 255, 0, 0) 

Then yes, at the end of 'group' should be 2 dots, but not in this case ;)

Link to comment
Make sure the function is exported on the meta.xml of "[ROG]Groups".

Yea, it is. I use that "if" statment in my gate scripts, and it works fine, i really have no idea why it won't work in this one...

Here is the export:

<export function="getPlayerGang" type="server" /> <!-- Arguments: thePlayer. Returns: The gang. --> 

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