Jump to content

[HELP]Gate Group


WASSIm.

Recommended Posts

Posted

I want make gate opens only when Group member are near that

local gate = createObject(971, 1535, -1451, 14, 0, 0, 0.27014160156) 
local marker = createMarker(1535, -1450, 14, "cylinder", 6, 255, 255, 255, 0) 
  
function moveGate(hitPlayer, matchingDimension) 
        moveObject(gate, 2000, 1535, -1451, 7) 
        setTimer(moveBack, 2000, 1) 
end 
addEventHandler("onMarkerHit", marker, moveGate) 
  
function moveBack() 
    moveObject(gate, 2000, 1535.02056884766, -1451.98352050781, 14.239881515503) 
end 

Dxscoreboard:

mtascreen20121217044023.png

Group Exmple: Grove

Omerta Roleplay

Posted
local gate = createObject(971, 1535, -1451, 14, 0, 0, 0.27014160156) 
local marker = createMarker(1535, -1450, 14, "cylinder", 6, 255, 255, 255, 0) 
  
function moveGate(hitPlayer, matchingDimension) 
    if (getElementType(hitPlayer) == "player") and matchingDimension then 
        if (getElementData(hitPlayer, "Group") == "Grove") then 
            moveObject(gate, 2000, 1535, -1451, 7) 
            setTimer(moveBack, 2000, 1) 
        end 
    end 
end 
addEventHandler("onMarkerHit", marker, moveGate) 
  
function moveBack() 
    moveObject(gate, 2000, 1535, -1451, 14) 
end 

CiTLh.png
Posted
local gate = createObject(971, 1535, -1451, 14, 0, 0, 0.27014160156) 
local marker = createMarker(1535, -1450, 14, "cylinder", 6, 255, 255, 255, 0) 
  
function moveGate(hitPlayer, matchingDimension) 
    if (getElementType(hitPlayer) == "player") and matchingDimension then 
        if (getElementData(hitPlayer, "Group") == "Grove") then 
            moveObject(gate, 2000, 1535, -1451, 7) 
            setTimer(moveBack, 2000, 1) 
        end 
    end 
end 
addEventHandler("onMarkerHit", marker, moveGate) 
  
function moveBack() 
    moveObject(gate, 2000, 1535, -1451, 14) 
end 

NOT WORK :(

this script gang :https://community.multitheftauto.com/index.php?p=resources&s=details&id=1514

Omerta Roleplay

Posted

use exported functions to check if player is in the group

[-] Exported functions:

addGang - Arguments: gangName, gangLeader. Returns: true or false.

removeGang - Arguments: gangName. Returns: true or false.

doesGangExists - Arguments: gangName. Returns: true or false.

getGangList - Arguments: None. Returns: A table with gang list.

getGangMembers - Arguments: gangName. Returns: A table with gang members.

addGangMember - Arguments: gangName, accountName, addedBy. Returns: true or false (if false, it'll return a second argument with the error.).

removeGangMember - Arguments: gangName, accountName, kickerName (if used it'll output who kicked the member, else it'll output that you left).

isGangMember - Arguments: gangName, accountName. Returns: true or false.

getAccountGang - Arguments: accountName. Returns: The gang name, 'None' otherwise.

getGangLeader - Arguments: gangName. Returns: The gang leader.

getGangSubLeaders - Arguments: gangName. Returns: A JSON string with gang sub leaders.

isPlayerGangInvited - Arguments: thePlayer. Returns: 3 arguments: invited, gangName, inviter.

getPlayersByGang - Arguments: gangName. Returns: A table with gang players.

isGangSubLeader - Arguments: gangName, accountName. Returns: true or false.

Actual Nick: [XGN]BorderLine

Actual Clan: XLatino

Actual Status: Staff, Mod Level 1

(BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline

Posted

I guess you are not using my "gang_system", because if you are, then you must get 'gang' element data instead.

local gate = createObject(971, 1535, -1451, 14, 0, 0, 0.27014160156) 
local marker = createMarker(1535, -1450, 14, "cylinder", 6, 255, 255, 255, 0) 
  
function moveGate(hitPlayer, matchingDimension) 
    if (getElementType(hitPlayer) == "player") and matchingDimension then 
        if (getElementData(hitPlayer, "group") == "Grove") then 
            moveObject(gate, 2000, 1535, -1451, 7) 
            setTimer(moveBack, 2000, 1) 
        end 
    end 
end 
addEventHandler("onMarkerHit", marker, moveGate) 
  
function moveBack() 
    moveObject(gate, 2000, 1535, -1451, 14) 
end 

Try that.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
I guess you are not using my "gang_system", because if you are, then you must get 'gang' element data instead.
local gate = createObject(971, 1535, -1451, 14, 0, 0, 0.27014160156) 
local marker = createMarker(1535, -1450, 14, "cylinder", 6, 255, 255, 255, 0) 
  
function moveGate(hitPlayer, matchingDimension) 
    if (getElementType(hitPlayer) == "player") and matchingDimension then 
        if (getElementData(hitPlayer, "group") == "Grove") then 
            moveObject(gate, 2000, 1535, -1451, 7) 
            setTimer(moveBack, 2000, 1) 
        end 
    end 
end 
addEventHandler("onMarkerHit", marker, moveGate) 
  
function moveBack() 
    moveObject(gate, 2000, 1535, -1451, 14) 
end 

Try that.

not work i using gang_system plis help

Omerta Roleplay

Posted
local gate = createObject(971, 1535, -1451, 14, 0, 0, 0.27014160156) 
local marker = createMarker(1535, -1450, 14, "cylinder", 6, 255, 255, 255, 0) 
  
function moveGate(hitPlayer, matchingDimension) 
    if (getElementType(hitPlayer) == "player") and matchingDimension then 
        if (getElementData(hitPlayer, "gang") == "Grove") then 
            moveObject(gate, 2000, 1535, -1451, 7) 
            setTimer(moveBack, 2000, 1) 
        end 
    end 
end 
addEventHandler("onMarkerHit", marker, moveGate) 
  
function moveBack() 
    moveObject(gate, 2000, 1535, -1451, 14) 
end 

Use that.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
local gate = createObject(971, 1535, -1451, 14, 0, 0, 0.27014160156) 
local marker = createMarker(1535, -1450, 14, "cylinder", 6, 255, 255, 255, 0) 
  
function moveGate(hitPlayer, matchingDimension) 
    if (getElementType(hitPlayer) == "player") and matchingDimension then 
        if (getElementData(hitPlayer, "gang") == "Grove") then 
            moveObject(gate, 2000, 1535, -1451, 7) 
            setTimer(moveBack, 2000, 1) 
        end 
    end 
end 
addEventHandler("onMarkerHit", marker, moveGate) 
  
function moveBack() 
    moveObject(gate, 2000, 1535, -1451, 14) 
end 

Use that.

THX :D

Omerta Roleplay

Posted
You're welcome.

you can help me for this plis

addEventHandler("onClientRender", root, 
  
    function() 
  
        dxDrawRectangle(0, 874, 1599, 26, tocolor(0, 0, 0, 160), true) 
  
        dxDrawLine(0, 873, 1599, 873, tocolor(0, 0, 0, 255), 2, true) 
  
        dxDrawText("                                       Page Facebook: [url=https://www.facebook.com/MTASA.TN]https://www.facebook.com/MTASA.TN[/url]", 0,  
  
874, 1599, 899, tocolor(127, 127, 127, 255), 1, "bankgothic", "left", "center", false, false, true, false,  
  
false) 
  
    end 
  
) 
  

Omerta Roleplay

Posted

What is the problem?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

It has no errors or anything, you set the script as client side? and I think positions are wrong or something, because I can't see te text at all.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

I couldn't see the rectangle/text, but that could be a resolution problem.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Have you created it on the same resolution as you are currently using? if so, is the script set as client side?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
Have you created it on the same resolution as you are currently using? if so, is the script set as client side?

i can look and player cant why :(

It's client side so only source can see it.

18447.gif18688.gif

Posted
Have you created it on the same resolution as you are currently using? if so, is the script set as client side?

i can look and player cant why :(

It's client side so only source can see it.

how fix ???

Omerta Roleplay

Posted

Should be visible for all clients, since is created client side, but every player.

Maybe they can't see it because of the same reason I couldn't, the position difference between resolutions.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
Should be visible for all clients, since is created client side, but every player.

Maybe they can't see it because of the same reason I couldn't, the position difference between resolutions.

plis how fix ?

Omerta Roleplay

Posted
Should be visible for all clients, since is created client side, but every player.

Maybe they can't see it because of the same reason I couldn't, the position difference between resolutions.

plis how fix ?

The text should be in the middle of the screen.

these functions should help you:

guiGetScreenSize  
guiGetSize 
guiSetPosition 

18447.gif18688.gif

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