Matty Posted August 31, 2012 Share Posted August 31, 2012 Hola de nuevo gente.... necesito ayuda para que el cmd "openat3" funcione solo para el team "Killers"... Code: function onlyTeam () local Team = getPlayerTeam (source) local name = getTeamFromName ("Killers") -- ... c1 = createObject(7017, 1521.6103515625, 1789.4267578125, 7.57905626297, 0, 90, 0) marker = createMarker ( 1521.6103515625, 1789.4267578125, 7.57905626297,'cylinder', 15, 0, 0, 255, 255) ----------------------------------------------------------------------------- function enablecommand (hitPlayer) if (hitPlayer) then addCommandHandler("openat3",open) end end addEventHandler("onMarkerHit",marker , enablecommand) ------------------------------------------------------------------------------ function disablecommand(leaveElement) if (leaveElement) then removeCommandHandler ( "openat3", leaveElement ) end end addEventHandler ("onMarkerLeave",marker,disablecommand) ------------------------------------------------------------------------------ function open() moveObject (c1, 4000, 1527.1838378906, 1789.4267578125, 7.57905626297) setTimer(autoclose, 5000, 1) end ------------------------------------------------------------------------------ function close () moveObject (c1, 4000, 1521.6103515625, 1789.4267578125, 7.57905626297) end Desde ya, Gracias Link to comment
Castillo Posted August 31, 2012 Share Posted August 31, 2012 Usa: getPlayerTeam + getTeamName Link to comment
Matty Posted August 31, 2012 Author Share Posted August 31, 2012 Okey, leeré los ejemplos, gracias Solid... Link to comment
Renkon Posted August 31, 2012 Share Posted August 31, 2012 if (getTeamName (getPlayerTeam ( commander )) == "Killers") Link to comment
Matty Posted August 31, 2012 Author Share Posted August 31, 2012 if (getTeamName (getPlayerTeam ( commander )) == "Killers") Lo usare, aver que tal. Gracias @Renkon Link to comment
Recommended Posts