Jump to content

Trying to do an gang/organization system


Bohemian_Bear

Recommended Posts

Posted

Well, i am here to ask you guys for something to read! I need to achiev this system and i need to do on my own, learning all things.

This is my "script", are only ideas and little code based on my known

function o_enterORG() 
    if ( getElementData ( source, "o_orgID" ) ~= 0 ) then 
        message "You already have an org" 
    else 
        gui with 2 buttons [ Accept ] [ Deny ] 
        onClick[Accept] setElementData ( source, "o_orgID", id_organization ) 
        onClick[Deny] close 
    end 
end 
  
  
function o_quitORG() 
    if ( getElementData ( source, "o_orgID" ) > 0 and ( source, "o_orgROLE" ) ~= "M" ) then 
        opengui with 2 buttons and text "Are you sure?" [Accept][Deny] 
            onClick[Accept] 
                setElementData ( source, "o_orgID", 0 ) 
                setElementData ( source, "o_orgROLE", "0" ) 
            onClick[Deny] 
                close 
    else 
        "You can't quit org; Reason:" 
        if ( getElementData ( source, "o_orgROLE" ) == "M" ) then 
            "You are the org master, try destroyin the organization" 
        else 
            "You don't have an org" 
    end 
end 
end 
  
  
function o_inviteORG() 
    if ( getElementData ( source, "o_orgROLE" ) ~= "M" ) then 
        "Only the master can invite members for org" 
    else 
        Open an gui on the invited player with one text and 2 buttons 
        "%PLAYERNAME% are inviting you to join %ORGNAME%" 
        OnClick[accept] 
            if ( getElementData ( source, "o_orgID" ) == 0 ) then 
            setElementData ( source, "o_orgID", %ORGID% ) 
            setElementData ( source, "o_orgROLE", "1" ) 
            else 
            "You are already on an org" 
        end 
    end 
end 
  
-- Set one skin based on the player role on the org 
-- needs to be an array "[99, 102, 199, 951" 
-- that i can search for 1 = 99, 3 = 199, 2 = 102 
function o_orgPJoin() 
    if ( getElementData ( source, "o_orgROLE" ) > 0 ) then 
        local skinnumber = "o_orgROLE" 
    end 
end 
  
  
-- This i'll open one panel with all functionalities of the org 
function o_drawORG() 
    if ( getElementData ( source, "o_orgROLE" ) > "0" ) then 
        org name 
        list all players on the org, white are ONLINE, gray are OFFLINE 
        org respect, org lvl 
        [ invite ][ quit ] 
    end 
end 
  
-- [invite] will trigger the o_enterORG 
-- [quit] will trigger the o_quitORG 

Anything you guys can send me for read will help!

sry for bad english

Posted

This is not the script. This is only one thing iam writing to know what i need to read about to learn those functions;

But i am trying to do one organization system. Police, government, factions and this kind of thing.

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