Jump to content

I need help with getPlayerTeam


Recommended Posts

So... i was trying to detect the player team when he dyes and when he dyes... this is the code:

function creaTeams () 
    teamhunters = createTeam ( "Hunters", 0, 255, 0 ) 
    teamreapers = createTeam ( "Reapers", 200, 0, 100 ) 
    teamstalkers = createTeam ( "Stalkers", 200, 0, 100 ) 
end 
addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), creaTeams ) 
  
function player_Wasted () 
  
    team = getPlayerTeam (source) 
    if team --??? 
    
addEventHandler ( "onPlayerWasted", getRootElement(), player_Wasted ) 
  

i'm a noob on scripting, and i don't know how to proceed :oops::P

Link to comment

Hello!

Here is your script :)

  
teamhunters = createTeam ("Hunters", 0, 255, 0 ) 
teamreapers = createTeam ("Reapers", 200, 0, 100 ) 
teamstalkers = createTeam ( "Stalkers", 200, 0, 100 ) 
  
function player_Wasted() 
team = getPlayerTeam (source) 
if team == teamhunters then 
                     --blabla 
if team == teamreapers then 
                 --blabla 
if team == teamstalkers then 
                --blabla 
end 
end 
end 
end 
addEventHandler ( "onPlayerWasted", getRootElement(), player_Wasted ) 

Hope i helped! :)

Link to comment
  • Moderators
Hello!

Here is your script :)

   
teamhunters = createTeam ("Hunters", 0, 255, 0 ) 
teamreapers = createTeam ("Reapers", 200, 0, 100 ) 
teamstalkers = createTeam ( "Stalkers", 200, 0, 100 ) 
  
function player_Wasted() 
team = getPlayerTeam (source) 
if team == teamhunters then 
                     --blabla 
if team == teamreapers then 
                 --blabla 
if team == teamstalkers then 
                --blabla 
end 
end 
end 
end 
addEventHandler ( "onPlayerWasted", getRootElement(), player_Wasted ) 

Hope i helped! :)

Sorry, but your script is wrong ! The correct script:

teamhunters = createTeam ("Hunters", 0, 255, 0 ) 
teamreapers = createTeam ("Reapers", 200, 0, 100 ) 
teamstalkers = createTeam ( "Stalkers", 200, 0, 100 ) 
  
function player_Wasted() 
    team = getPlayerTeam (source) 
    if team == teamhunters then 
            --blabla 
    end 
    if team == teamreapers then 
            --blabla 
    end 
    if team == teamstalkers then 
          --blabla 
    end 
end 
addEventHandler ( "onPlayerWasted", getRootElement(), player_Wasted ) 
  

Link to comment

OK ! :D thanks to all...! :P but now i've to trigger an event from a client script...

this is the gui: (clientside script)

GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Memo = {} 
GUIEditor_Label = {} 
GUIEditor_Image = {} 
  
function startup() 
GUIEditor_Window[1] = guiCreateWindow(0,0,0.99,1,"...SCEGLI UNA FAZIONE...",true) 
guiSetVisible(GUIEditor_Window[1],false) 
GUIEditor_Memo[1] = guiCreateMemo(0.0164,0.0517,0.5404,0.56,"21 dicembre 2012...\nLa data piu' conosciuta sulla faccia di\nquesto misero pianeta.\nFino ad un anno prima andava tutto bene,\nfino a quando, per i classici motivi\ndi soldi, non scoppio' l' ennesima,\ndisastrosa, guerra mondiale.\nFurono usate armi biologiche e nucleari,\nfino ad ottenere questo cazzo di risultato...\nUn mondo di merda ricoperto da zombies di merda\ntenuti in vita da quelle radiazioni e da quei composti \nchimici DI MERDA.\nNegli anni seguenti si sono formate diverse comunita':\ngli HUNTERS, i Reaper e gli Stalkers.\nIl tuo compito e' quello di entrare a fare parte di uno di questi\ngruppi e di ammazzare quei fottuti zombies.\nChe cosa stai aspettando ancora? e' il tuo momento.\n",true,GUIEditor_Window[1]) 
GUIEditor_Image[1] = guiCreateStaticImage(0.5101,0.1017,0.4836,0.4767,"images/mtalogo.png",true,GUIEditor_Window[1]) 
GUIEditor_Button[1] = guiCreateButton(0.0278,0.8267,0.2374,0.1217,"HUNTERS",true,GUIEditor_Window[1]) 
GUIEditor_Button[2] = guiCreateButton(0.3851,0.8267,0.2374,0.1217,"REAPER",true,GUIEditor_Window[1]) 
GUIEditor_Button[3] = guiCreateButton(0.7172,0.8267,0.2374,0.1217,"STALKERS",true,GUIEditor_Window[1]) 
GUIEditor_Label[1] = guiCreateLabel(0.2841,0.6783,0.4306,0.0717,"VOGLIO FARE PARTE DEI:",true,GUIEditor_Window[1]) 
guiLabelSetColor(GUIEditor_Label[1],255,255,255) 
guiLabelSetVerticalAlign(GUIEditor_Label[1],"center") 
guiLabelSetHorizontalAlign(GUIEditor_Label[1],"center",false) 
addEventHandler ( "onClientGUIClick", GUIEditor_Button[1], warpbasehunters, true ) 
addEventHandler ( "onClientGUIClick", GUIEditor_Button[2], warpbasereaper, true ) 
addEventHandler ( "onClientGUIClick", GUIEditor_Button[3], warpbasestalkers, true ) 
addEventHandler ( "onClientGUIClick", GUIEditor_Button[1], selezionaskin, false ) 
addEventHandler ( "onClientGUIClick", GUIEditor_Button[2], selezionaskin, false ) 
addEventHandler ( "onClientGUIClick", GUIEditor_Button[3], selezionaskin, false ) 
end 
addEventHandler("onClientResourceStart",getResourceRootElement(),startup) 

i want that when a player click on a GUIEditor_Button, the serverside script will set you in the relative team...

have i to do these?

GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Memo = {} 
GUIEditor_Label = {} 
GUIEditor_Image = {} 
  
function startup() 
GUIEditor_Window[1] = guiCreateWindow(0,0,0.99,1,"...SCEGLI UNA FAZIONE...",true) 
guiSetVisible(GUIEditor_Window[1],false) 
GUIEditor_Memo[1] = guiCreateMemo(0.0164,0.0517,0.5404,0.56,"21 dicembre 2012...\nLa data piu' conosciuta sulla faccia di\nquesto misero pianeta.\nFino ad un anno prima andava tutto bene,\nfino a quando, per i classici motivi\ndi soldi, non scoppio' l' ennesima,\ndisastrosa, guerra mondiale.\nFurono usate armi biologiche e nucleari,\nfino ad ottenere questo cazzo di risultato...\nUn mondo di merda ricoperto da zombies di merda\ntenuti in vita da quelle radiazioni e da quei composti \nchimici DI MERDA.\nNegli anni seguenti si sono formate diverse comunita':\ngli HUNTERS, i Reaper e gli Stalkers.\nIl tuo compito e' quello di entrare a fare parte di uno di questi\ngruppi e di ammazzare quei fottuti zombies.\nChe cosa stai aspettando ancora? e' il tuo momento.\n",true,GUIEditor_Window[1]) 
GUIEditor_Image[1] = guiCreateStaticImage(0.5101,0.1017,0.4836,0.4767,"images/mtalogo.png",true,GUIEditor_Window[1]) 
GUIEditor_Button[1] = guiCreateButton(0.0278,0.8267,0.2374,0.1217,"HUNTERS",true,GUIEditor_Window[1]) 
GUIEditor_Button[2] = guiCreateButton(0.3851,0.8267,0.2374,0.1217,"REAPER",true,GUIEditor_Window[1]) 
GUIEditor_Button[3] = guiCreateButton(0.7172,0.8267,0.2374,0.1217,"STALKERS",true,GUIEditor_Window[1]) 
GUIEditor_Label[1] = guiCreateLabel(0.2841,0.6783,0.4306,0.0717,"VOGLIO FARE PARTE DEI:",true,GUIEditor_Window[1]) 
guiLabelSetColor(GUIEditor_Label[1],255,255,255) 
guiLabelSetVerticalAlign(GUIEditor_Label[1],"center") 
guiLabelSetHorizontalAlign(GUIEditor_Label[1],"center",false) 
addEventHandler ( "onClientGUIClick", GUIEditor_Button[1], warpbasehunters, true ) 
addEventHandler ( "onClientGUIClick", GUIEditor_Button[2], warpbasereaper, true ) 
addEventHandler ( "onClientGUIClick", GUIEditor_Button[3], warpbasestalkers, true ) 
addEventHandler ( "onClientGUIClick", GUIEditor_Button[1], selezionaskin, false ) 
addEventHandler ( "onClientGUIClick", GUIEditor_Button[2], selezionaskin, false ) 
addEventHandler ( "onClientGUIClick", GUIEditor_Button[3], selezionaskin, false ) 
end 
addEventHandler("onClientResourceStart",getResourceRootElement(),startup) 

addEvent( "player_Wasted", true ) 
function player_Wasted() 
    team = getPlayerTeam (source) 
    if team == teamhunters then 
            spawnPlayer(source, the coords of hunters base) 
    end 
    if team == teamreapers then 
            spawnPlayer(source, the coords of reapers base) 
    end 
    if team == teamstalkers then 
            spawnPlayer(source, the coords of stalkers base) 
    end 
end 
addEventHandler ( "player_Wasted", getRootElement(), player_Wasted ) 

serverside script:

  
teamhunters = createTeam ("Hunters", 0, 255, 0 ) 
teamreapers = createTeam ("Reapers", 200, 0, 100 ) 
teamstalkers = createTeam ( "Stalkers", 200, 0, 100 ) 
  
addEvent( "player_Wasted", true ) 
function player_Wasted() 
    team = getPlayerTeam (source) 
    if team == teamhunters then 
            spawnPlayer(source, the coords of hunters base) 
    end 
    if team == teamreapers then 
            spawnPlayer(source, the coords of reapers base) 
    end 
    if team == teamstalkers then 
            spawnPlayer(source, the coords of stalkers base) 
    end 
end 
addEventHandler ( "onPlayerWasted", getRootElement(), player_Wasted ) 

Link to comment
  • Moderators

1st question why do you add this ?:

addEventHandler ( "onClientGUIClick", GUIEditor_Button[1], selezionaskin, false ) 
addEventHandler ( "onClientGUIClick", GUIEditor_Button[2], selezionaskin, false ) 
addEventHandler ( "onClientGUIClick", GUIEditor_Button[3], selezionaskin, false ) 

Link to comment

in the last post i'm not explained well...

clientside:

GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Memo = {} 
GUIEditor_Label = {} 
GUIEditor_Image = {} 
  
function startup () 
GUIEditor_Window[1] = guiCreateWindow(261,109,806,539,"...SCEGLI UNA FAZIONE...",false) 
guiWindowSetSizable(GUIEditor_Window[1],false) 
guiSetVisible(GUIEditor_Window[1],false) 
GUIEditor_Memo[1] = guiCreateMemo(9,26,377,267,"21 dicembre 2012...\nLa data piu' conosciuta sulla faccia di\nquesto misero pianeta.\nFino ad un anno prima andava tutto bene,\nfino a quando, per i classici motivi\ndi soldi, non scoppio' l' ennesima,\ndisastrosa, guerra mondiale.\nFurono usate armi biologiche e nucleari,\nfino ad ottenere questo cazzo di risultato...\nUn mondo di merda ricoperto da zombies di merda\ntenuti in vita da quelle radiazioni e da quei composti \nchimici DI MERDA.\nNegli anni seguenti si sono formate diverse comunita':\ngli Hunters, i Reapers e gli Stalkers.\nIl tuo compito e' quello di entrare a fare parte di uno di questi\ngruppi e di ammazzare quei fottuti zombies.\nChe cosa stai aspettando ancora? e' il tuo momento.",false,GUIEditor_Window[1]) 
guiMemoSetReadOnly(GUIEditor_Memo[1],true) 
GUIEditor_Image[1] = guiCreateStaticImage(405,27,351,271,"images/mtalogo.png",false,GUIEditor_Window[1]) 
GUIEditor_Label[1] = guiCreateLabel(273,346,422,29,"HO SCELTO... VOGLIO FARE PARTE DEI:",false,GUIEditor_Window[1]) 
guiLabelSetColor(GUIEditor_Label[1],255,255,255) 
guiLabelSetVerticalAlign(GUIEditor_Label[1],"top") 
guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) 
GUIEditor_Button[1] = guiCreateButton(11,444,250,64,"HUNTERS",false,GUIEditor_Window[1]) 
guiSetFont(GUIEditor_Button[1],"sa-header") 
GUIEditor_Button[2] = guiCreateButton(269,444,250,64,"REAPERS",false,GUIEditor_Window[1]) 
guiSetFont(GUIEditor_Button[2],"sa-header") 
GUIEditor_Button[3] = guiCreateButton(529,444,263,64,"STALKERS",false,GUIEditor_Window[1]) 
guiSetFont(GUIEditor_Button[3],"sa-header") 
addEventHandler ( "onClientGUIClick", GUIEditor_Button[1], warpbasehunters, true ) 
addEventHandler ( "onClientGUIClick", GUIEditor_Button[2], warpbasereaper, true ) 
addEventHandler ( "onClientGUIClick", GUIEditor_Button[3], warpbasestalkers, true ) 
end 
addEventHandler("onClientResourceStart",getResourceRootElement(),startup) 
  
addEvent( "onPlayer_Wasted", true ) 
function player_Wasted() 
    team = getPlayerTeam (source) 
    if team == teamhunters then 
            spawnPlayer(source, the coords of hunters base) 
    end 
    if team == teamreapers then 
            spawnPlayer(source, the coords of reapers base) 
    end 
    if team == teamstalkers then 
            spawnPlayer(source, the coords of stalkers base) 
    end 
end 
addEventHandler ( "onPlayer_Wasted", getRootElement(), player_Wasted ) 
  
--opens the gui-- 
function visibile() 
    if (guiGetVisible(GUIEditor_Window[1])) then 
        showCursor(false) 
        guiSetVisible(GUIEditor_Window[1],false) 
    else 
        showCursor(true) 
        guiSetVisible(GUIEditor_Window[1],true) 
    end 
end 
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), visibile) 
-------------------- 

serverside:

addEventHandler("onResourceStart", resourceRoot, 
    function() 
        for i,player in ipairs(getElementsByType("player")) do 
            spawn(player) 
        end 
    end 
) 
  
function spawn(player) 
    repeat until spawnPlayer ( player, -2252.1818847656, 2278.2119140625, 1073.4588623047 ) 
    fadeCamera(player, true) 
    setCameraTarget(player, player) 
end 
  
addEventHandler("onPlayerJoin", root, 
    function() 
        spawn(source) 
    end 
) 
  
function creaTeams () 
    teamhunters = createTeam ( "Hunters", 0, 255, 0 ) 
    teamreapers = createTeam ( "Reapers", 200, 0, 100 ) 
    teamstalkers = createTeam ( "Stalkers", 200, 0, 100 ) 
end 
addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), creaTeams ) 
  
addEvent( "onPlayer_Wasted", true ) 
function player_Wasted() 
    team = getPlayerTeam (source) 
    if team == teamhunters then 
            spawnPlayer(source, the coords of hunters base) 
    end 
    if team == teamreapers then 
            spawnPlayer(source, the coords of reapers base) 
    end 
    if team == teamstalkers then 
            spawnPlayer(source, the coords of stalkers base) 
    end 
end 
triggerClientEvent ( "onGreeting", getRootElement(), player_Wasted ) 

is it well done? :)

Link to comment
  • Moderators

Server-Side:

addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), 
    function() 
        for i,player in ipairs(getElementsByType("player")) do 
            spawn(player) -- Why spawn all players ? Because they have not chosen their team yet --' 
        end 
    end 
) 
  
function spawn(player) 
    repeat until spawnPlayer ( player, -2252.1818847656, 2278.2119140625, 1073.4588623047 ) 
    fadeCamera(player, true) 
    setCameraTarget(player, player) 
end 
  
addEventHandler("onPlayerJoin", root, 
    function() 
        spawn(source) 
    end 
) 
  
teamhunters = createTeam ("Hunters", 0, 255, 0 ) 
teamreapers = createTeam ("Reapers", 200, 0, 100 ) 
teamstalkers = createTeam ( "Stalkers", 200, 0, 100 ) 
  
function player_Wasted() 
    if team == teamhunters then 
        spawnPlayer(source, the coords of hunters base) 
    elseif team == teamreapers then 
        spawnPlayer(source, the coords of reapers base) 
    elseif team == teamstalkers then 
        spawnPlayer(source, the coords of stalkers base) 
    end 
end 
addEventHandler ( "onPlayerWasted", getRootElement(), player_Wasted ) 
  
addEvent( "onTeamSelected", true ) 
function onTeamSelected( theTeam ) 
    if theTeam then 
        local team = getTeamFromName( ""..theTeam) 
        setPlayerTeam( source, team ) 
        outputChatBox("You joined successfully !" ) 
    end 
end 
addEventHandler ( "onTeamSelected", getRootElement(), onTeamSelected ) 
  

Client-Side:

GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Memo = {} 
GUIEditor_Label = {} 
GUIEditor_Image = {} 
  
function warpbasehunters() 
    outputChatBox( "You chose the Hunters's team !" ) 
    visibile() 
    triggerServerEvent("onTeamSelected", getLocalPlayer(), "Hunters" ) 
end 
  
function warpbasereaper() 
    outputChatBox( "You chose the Reapers's team !" ) 
    visibile() 
    triggerServerEvent("onTeamSelected", getLocalPlayer(), "Reapers" ) 
end 
  
function warpbasestalkers() 
    outputChatBox( "You chose the Talkers's team !" ) 
    visibile() 
    triggerServerEvent("onTeamSelected", getLocalPlayer(), "Stalkers" ) 
end 
  
function startup() 
    GUIEditor_Window[1] = guiCreateWindow(0,0,0.99,1,"...SCEGLI UNA FAZIONE...",true) 
    guiSetVisible(GUIEditor_Window[1],false) 
    GUIEditor_Memo[1] = guiCreateMemo(0.0164,0.0517,0.5404,0.56,"21 dicembre 2012...\nLa data piu' conosciuta sulla faccia di\nquesto misero pianeta.\nFino ad un anno prima andava tutto bene,\nfino a quando, per i classici motivi\ndi soldi, non scoppio' l' ennesima,\ndisastrosa, guerra mondiale.\nFurono usate armi biologiche e nucleari,\nfino ad ottenere questo cazzo di risultato...\nUn mondo di merda ricoperto da zombies di merda\ntenuti in vita da quelle radiazioni e da quei composti \nchimici DI MERDA.\nNegli anni seguenti si sono formate diverse comunita':\ngli HUNTERS, i Reaper e gli Stalkers.\nIl tuo compito e' quello di entrare a fare parte di uno di questi\ngruppi e di ammazzare quei fottuti zombies.\nChe cosa stai aspettando ancora? e' il tuo momento.\n",true,GUIEditor_Window[1]) 
    GUIEditor_Image[1] = guiCreateStaticImage(0.5101,0.1017,0.4836,0.4767,"images/mtalogo.png",true,GUIEditor_Window[1]) 
    GUIEditor_Button[1] = guiCreateButton(0.0278,0.8267,0.2374,0.1217,"HUNTERS",true,GUIEditor_Window[1]) 
    GUIEditor_Button[2] = guiCreateButton(0.3851,0.8267,0.2374,0.1217,"REAPER",true,GUIEditor_Window[1]) 
    GUIEditor_Button[3] = guiCreateButton(0.7172,0.8267,0.2374,0.1217,"STALKERS",true,GUIEditor_Window[1]) 
    GUIEditor_Label[1] = guiCreateLabel(0.2841,0.6783,0.4306,0.0717,"VOGLIO FARE PARTE DEI:",true,GUIEditor_Window[1]) 
    guiLabelSetColor(GUIEditor_Label[1],255,255,255) 
    guiLabelSetVerticalAlign(GUIEditor_Label[1],"center") 
    guiLabelSetHorizontalAlign(GUIEditor_Label[1],"center",false) 
    addEventHandler ( "onClientGUIClick", GUIEditor_Button[1], warpbasehunters, true ) 
    addEventHandler ( "onClientGUIClick", GUIEditor_Button[2], warpbasereaper, true ) 
    addEventHandler ( "onClientGUIClick", GUIEditor_Button[3], warpbasestalkers, true ) 
end 
addEventHandler("onClientResourceStart",getResourceRootElement(),startup) 
  
  
--opens the gui-- 
function visibile() 
    if (guiGetVisible(GUIEditor_Window[1])) then 
        showCursor(false) 
        guiSetVisible(GUIEditor_Window[1],false) 
    else 
        showCursor(true) 
        guiSetVisible(GUIEditor_Window[1],true) 
    end 
end 
-- addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), visibile) 

Link to comment
Server-Side:

addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), 
    function() 
        for i,player in ipairs(getElementsByType("player")) do 
            spawn(player) -- Why spawn all players ? Because they have not chosen their team yet --' 
        end 
    end 
) 
  
function spawn(player) 
    repeat until spawnPlayer ( player, -2252.1818847656, 2278.2119140625, 1073.4588623047 ) 
    fadeCamera(player, true) 
    setCameraTarget(player, player) 
end 
  
addEventHandler("onPlayerJoin", root, 
    function() 
        spawn(source) 
    end 
) 
  
teamhunters = createTeam ("Hunters", 0, 255, 0 ) 
teamreapers = createTeam ("Reapers", 200, 0, 100 ) 
teamstalkers = createTeam ( "Stalkers", 200, 0, 100 ) 
  
function player_Wasted() 
    if team == teamhunters then 
        spawnPlayer(source, the coords of hunters base) 
    elseif team == teamreapers then 
        spawnPlayer(source, the coords of reapers base) 
    elseif team == teamstalkers then 
        spawnPlayer(source, the coords of stalkers base) 
    end 
end 
addEventHandler ( "onPlayerWasted", getRootElement(), player_Wasted ) 
  
addEvent( "onTeamSelected", true ) 
function onTeamSelected( theTeam ) 
    if theTeam then 
        local team = getTeamFromName( ""..theTeam) 
        setPlayerTeam( source, team ) 
        outputChatBox("You joined successfully !" ) 
    end 
end 
addEventHandler ( "onTeamSelected", getRootElement(), onTeamSelected ) 
  

Client-Side:

GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Memo = {} 
GUIEditor_Label = {} 
GUIEditor_Image = {} 
  
function warpbasehunters() 
    outputChatBox( "You chose the Hunters's team !" ) 
    visibile() 
    triggerServerEvent("onTeamSelected", getLocalPlayer(), "Hunters" ) 
end 
  
function warpbasereaper() 
    outputChatBox( "You chose the Reapers's team !" ) 
    visibile() 
    triggerServerEvent("onTeamSelected", getLocalPlayer(), "Reapers" ) 
end 
  
function warpbasestalkers() 
    outputChatBox( "You chose the Talkers's team !" ) 
    visibile() 
    triggerServerEvent("onTeamSelected", getLocalPlayer(), "Stalkers" ) 
end 
  
function startup() 
    GUIEditor_Window[1] = guiCreateWindow(0,0,0.99,1,"...SCEGLI UNA FAZIONE...",true) 
    guiSetVisible(GUIEditor_Window[1],false) 
    GUIEditor_Memo[1] = guiCreateMemo(0.0164,0.0517,0.5404,0.56,"21 dicembre 2012...\nLa data piu' conosciuta sulla faccia di\nquesto misero pianeta.\nFino ad un anno prima andava tutto bene,\nfino a quando, per i classici motivi\ndi soldi, non scoppio' l' ennesima,\ndisastrosa, guerra mondiale.\nFurono usate armi biologiche e nucleari,\nfino ad ottenere questo cazzo di risultato...\nUn mondo di merda ricoperto da zombies di merda\ntenuti in vita da quelle radiazioni e da quei composti \nchimici DI MERDA.\nNegli anni seguenti si sono formate diverse comunita':\ngli HUNTERS, i Reaper e gli Stalkers.\nIl tuo compito e' quello di entrare a fare parte di uno di questi\ngruppi e di ammazzare quei fottuti zombies.\nChe cosa stai aspettando ancora? e' il tuo momento.\n",true,GUIEditor_Window[1]) 
    GUIEditor_Image[1] = guiCreateStaticImage(0.5101,0.1017,0.4836,0.4767,"images/mtalogo.png",true,GUIEditor_Window[1]) 
    GUIEditor_Button[1] = guiCreateButton(0.0278,0.8267,0.2374,0.1217,"HUNTERS",true,GUIEditor_Window[1]) 
    GUIEditor_Button[2] = guiCreateButton(0.3851,0.8267,0.2374,0.1217,"REAPER",true,GUIEditor_Window[1]) 
    GUIEditor_Button[3] = guiCreateButton(0.7172,0.8267,0.2374,0.1217,"STALKERS",true,GUIEditor_Window[1]) 
    GUIEditor_Label[1] = guiCreateLabel(0.2841,0.6783,0.4306,0.0717,"VOGLIO FARE PARTE DEI:",true,GUIEditor_Window[1]) 
    guiLabelSetColor(GUIEditor_Label[1],255,255,255) 
    guiLabelSetVerticalAlign(GUIEditor_Label[1],"center") 
    guiLabelSetHorizontalAlign(GUIEditor_Label[1],"center",false) 
    addEventHandler ( "onClientGUIClick", GUIEditor_Button[1], warpbasehunters, true ) 
    addEventHandler ( "onClientGUIClick", GUIEditor_Button[2], warpbasereaper, true ) 
    addEventHandler ( "onClientGUIClick", GUIEditor_Button[3], warpbasestalkers, true ) 
end 
addEventHandler("onClientResourceStart",getResourceRootElement(),startup) 
  
  
--opens the gui-- 
function visibile() 
    if (guiGetVisible(GUIEditor_Window[1])) then 
        showCursor(false) 
        guiSetVisible(GUIEditor_Window[1],false) 
    else 
        showCursor(true) 
        guiSetVisible(GUIEditor_Window[1],true) 
    end 
end 
-- addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), visibile) 

YOU SHOULD BE HOLY :shock:

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