Jump to content

error


cuervox123

Recommended Posts

alguien me podria ayudar a poner correctamente la funcion de S,aqui el error:

server.lua Bad argument @ takeWeapon [Expected element at argument 1,got string 'Wiz_Khalifa'

c:

function quitarelarma() 
if guiGridListGetSelectedItem(gridlistap) ~= -1 and  guiGridListGetSelectedItem(armagrid) ~= -1 then 
do 
local player = getPlayerFromName (guiGridListGetItemText(gridlistap, guiGridListGetSelectedItem(gridlistap), 1)) 
if player then 
guiSetText(LabelPlayer, getPlayerName(player)) 
local els = guiGetText(LabelPlayer) 
local id = getWeaponNameFromID (guiGridListGetItemText(armagrid, guiGridListGetSelectedItem(armagrid), 1)) 
triggerServerEvent ("Eliminararmaa", player, els, id) 
end 
end 
end 
end 
addEventHandler("onClientGUIClick", quitarla, quitarelarma)    

S:

function eliminararma(player, id) 
takeWeapon( player, id ) 
end 
addEvent("Eliminararmaa", true) 
addEventHandler ("Eliminararmaa", root, eliminararma) 

Link to comment
function eliminararma(pName, id) 
takeWeapon( source, id ) 
end 
addEvent("Eliminararmaa", true) 
addEventHandler ("Eliminararmaa", root, eliminararma) 

function eliminararma(pName, id) 
takeWeapon( client, id ) 
end 
addEvent("Eliminararmaa", true) 
addEventHandler ("Eliminararmaa", root, eliminararma) 

<3

Link to comment
function eliminararma(pName, id) 
takeWeapon( source, id ) 
end 
addEvent("Eliminararmaa", true) 
addEventHandler ("Eliminararmaa", root, eliminararma) 

function eliminararma(pName, id) 
takeWeapon( client, id ) 
end 
addEvent("Eliminararmaa", true) 
addEventHandler ("Eliminararmaa", root, eliminararma) 

<3

Esa variable no es para el cliente que llamó el evento?

Link to comment
function eliminararma(pName, id) 
takeWeapon( source, id ) 
end 
addEvent("Eliminararmaa", true) 
addEventHandler ("Eliminararmaa", root, eliminararma) 

function eliminararma(pName, id) 
takeWeapon( client, id ) 
end 
addEvent("Eliminararmaa", true) 
addEventHandler ("Eliminararmaa", root, eliminararma) 

<3

Esa variable no es para el cliente que llamó el evento?

Oh, my bad xD pensé que se quería sacar su arma, algo así como un inventario :P

Link to comment
  • Recently Browsing   0 members

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