Jump to content

[Ayuda] Dar Arma a todos


Recommended Posts

Posted
getElementsByType 

Usa esa funcion para obtener una tabla con todos los jugadores, luego usa un for-loop para obtener cada uno.

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

La manera que te dije es la unica para dar un arma a todos los jugadores.

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

Para obtener los jugadores online en una tabla, si, esa.

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

algo asi no no??

addCommandHandler ( "giveall", 
 function (thePlayer,_,weapon )  
 local name = getPlayerName(thePlayer) 
 local accName = getAccountName ( getPlayerAccount ( thePlayer ) )  
 if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then  
 giveWeapon (getRootElement(),weapon) 
 outputChatBox ( "#5555FFThe #00FF00Admin #5555FF" .. name .. "#00FF00 Has #5555FFGive #00FF00All #5555FFPlayers #00FF00".. weapon .."#5555FF$", getRootElement(), 255, 0, 0, true ) 
 end 
 end ) 
  

Skype: Juliang09123

Posted
giveWeapon (getRootElement(),weapon) 

dijo que uses un for-loop de

getElementsByType 

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

Me lo pueden corregir?

addCommandHandler ( "giveall", 
 function (thePlayer,_,weapon ) 
 local name = getPlayerName(thePlayer) 
 local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
 if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
for i, v in ipairs(getElementsByType("player")) do 
 outputChatBox ( "#5555FFThe #00FF00Admin #5555FF" .. name .. "#00FF00 Has #5555FFGive #00FF00All #5555FFPlayers #00FF00".. weapon .."#5555FF$", getRootElement(), 255, 0, 0, true ) 
 end 
 end ) 

Skype: Juliang09123

Posted
addCommandHandler ( "giveall", 
 function (thePlayer,_,weapon ) 
 local name = getPlayerName(thePlayer) 
 local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
 if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
for i, v in ipairs(getElementsByType("player")) do 
if weapon then 
giveWeapon(v, tonumber(weapon)) 
 outputChatBox ( "#5555FFThe #00FF00Admin #5555FF" .. name .. "#00FF00 Has #5555FFGive #00FF00All #5555FFPlayers #00FF00".. weapon .."#5555FF$", getRootElement(), 255, 0, 0, true ) 
 end 
 end 
 end 
 end  
) 

State: Inactive

Posted
Perdón mi ignorancia, ¿el parámetro "_" previo a weapon qué representa?

Quiere decir que se dropea la variable, es decir, no se le da uso y se dropea

Posted
addCommandHandler ( "giveall", 
 function (thePlayer,_,weapon ) 
 local name = getPlayerName(thePlayer) 
 local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
 if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
for i, v in ipairs(getElementsByType("player")) do 
if weapon then 
giveWeapon(v, tonumber(weapon)) 
 outputChatBox ( "#5555FFThe #00FF00Admin #5555FF" .. name .. "#00FF00 Has #5555FFGive #00FF00All #5555FFPlayers #00FF00".. weapon .."#5555FF$", getRootElement(), 255, 0, 0, true ) 
 end 
 end 
 end 
 end  
) 

Sasuke Y como seria para ponerle el commandhandler /dararma Id y all o los jugadores

Skype: Juliang09123

  • 1 month later...
Posted

Para eso Dale un arma al q quieras con el admin panel xD

En el foro se me conocia Como alexmercer1998 y Ezio Auditore esta es mi nuevo nombre para que esten informados ¬¬

Posted
Para eso Dale un arma al q quieras con el admin panel xD

Alex, es que no se trata de eso, esto es que con el comando giveall le des arma a todos y no se estén dando la paja de dar a través del panel admin.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...