Jump to content

CW Script...Some help please?


Recommended Posts

Client: - Remember to attach a event handler ( onClientGUIClick maybe? )

  
  
function someFunc() 
     local edit = guiGetText(editBoxName) 
     if edit == "" then return end 
     triggerServerEvent("createMyTeam", localPlayer, edit) 
end 
  
  

Server:

  
addEvent("createMyTeam", true) 
addEventHandler("createMyTeam", root, function(team) 
     createTeam(team) 
end 
) 
  

Link to comment
  
local r,g,b,a = 255, 255, 255, 255 
addEventHandler('onClientRender', root, function() 
dxDrawText ( playerZoneName, 44, screenHeight - 41, screenWidth, screenHeight, tocolor ( r, g, b, a ), 1.02, "pricedown" ) 
end 
r,g,b,a = 255, 0, 255, 200 
) 
  
  

Do something like this.

Link to comment

Made a function for you :P

  
function getDeadPlayersInTeam(theTeam) 
    local theTable = { } 
    local players = getPlayersInTeam(theTeam) 
  
    for i,v in pairs(players) do 
      if isPedDead(v) then 
        theTable[#theTable+1]=v 
      end 
    end 
  
    return theTable 
end 
  

-- I modified a function from MTA;SA wiki.

use this also;

  
spawnPlayer() 
  

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