Plate Posted July 20, 2012 Posted July 20, 2012 hola como se podria hacer para que en este script aparesca el nombre del player que lo agrego al team y el nombre del que fue agregado ? addEvent("grupos",true) function grupos(player, groupname) local account = getPlayerAccount(player) if ( not isGuestAccount ( account ) ) then local group = aclGetGroup ( groupname ) if ( group ) then local isInACLGroup = isObjectInACLGroup ( "user." .. getAccountName ( account ), group) if ( not isInACLGroup ) then aclGroupAddObject ( group, "user."..getAccountName ( account ) ) local pname = getPlayerName(player) setPlayerTeam ( player, USS ) outputChatBox(tostring(pname) .." has added '".. getPlayerName(player .."' to " .. groupname .. ".", getRootElement(), 0, 255 ,255 ) elseif ( isInACLGroup ) then aclGroupRemoveObject ( group, "user."..getAccountName ( account ) ) local pname2 = getPlayerName(player) outputChatBox (tostring(pname2) .." has removed " ..getPlayerName(player).. " from " .. groupname .. ".", getRootElement(), 0, 255 ,255 ) setPlayerTeam(player, nil) end else outputChatBox ( "El " .. groupname .. " No existe.", source, 255, 0 ,0 ) end else outputChatBox ( "El jugador no esta logeado.", source, 255, 100 ,100 ) end end addEventHandler("grupos", getRootElement(), grupos) Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Castillo Posted July 20, 2012 Posted July 20, 2012 outputChatBox(tostring(pname) .." has added '".. getPlayerName(player .."' to " .. groupname .. ".", getRootElement(), 0, 255 ,255 ) Te falta un parentesis en getPlayerName, ademas podrias usar directamente "pname", ya que la definiste anteriormente. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Plate Posted July 20, 2012 Author Posted July 20, 2012 me dice error Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Plate Posted July 21, 2012 Author Posted July 21, 2012 Alguien me puede contestar porfaaaa Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
iFoReX Posted July 21, 2012 Posted July 21, 2012 pusiste el parentesis Plate ? elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
Plate Posted July 21, 2012 Author Posted July 21, 2012 sisi pero no hace lo que yo quiero que haga por que cuando alguien agrega a el otro un ejemplo yo agrego a EL_X enves de Plate agrego a EL_X a S.T.A.R.S aparece EL_X agrego a EL_X a S.T.A.R.S Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Recommended Posts